summaryrefslogtreecommitdiffstats
path: root/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch')
-rw-r--r--meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch34477
1 files changed, 34477 insertions, 0 deletions
diff --git a/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch b/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
new file mode 100644
index 0000000000..3ad5c081f1
--- /dev/null
+++ b/meta/packages/qemu/qemu-git/qemu-git-qemugl-host.patch
@@ -0,0 +1,34477 @@
1diff --git a/Makefile.target b/Makefile.target
2index f33f762..d1eb876 100644
3--- a/Makefile.target
4+++ b/Makefile.target
5@@ -153,6 +153,10 @@ endif
6 CPPFLAGS+=-I$(SRC_PATH)/fpu
7 LIBOBJS+= op_helper.o helper.o
8
9+ifeq ($(TARGET_BASE_ARCH), i386)
10+LIBOBJS+=helper_opengl.o opengl_exec.o
11+endif
12+
13 ifeq ($(TARGET_BASE_ARCH), arm)
14 LIBOBJS+= neon_helper.o iwmmxt_helper.o
15 endif
16@@ -224,6 +228,21 @@ op_helper.o: CFLAGS += $(HELPER_CFLAGS) $(I386_CFLAGS)
17
18 cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
19
20+parse_gl_h: parse_gl_h.c
21+ $(CC) -g -o $@ $<
22+server_stub.c: parse_gl_h
23+ ./parse_gl_h
24+gl_func.h: parse_gl_h
25+ ./parse_gl_h
26+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
27+opengl_func.h: gl_func.h
28+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
29+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
30+gl_beginend.h: ../target-i386/beginend_funcs.sh
31+ $< > $@
32+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
33+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
34+
35 #########################################################
36 # Linux user emulator target
37
38@@ -584,7 +603,7 @@ OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
39 OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o
40 OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
41 OBJS += device-hotplug.o pci-hotplug.o
42-CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
43+CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE -DTARGET_OPENGL_OK
44 endif
45 ifeq ($(TARGET_BASE_ARCH), ppc)
46 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
47@@ -727,7 +746,7 @@ endif
48 $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
49
50 $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
51- $(LINK)
52+ $(LINK) -lGL -lGLU
53
54 endif # !CONFIG_USER_ONLY
55
56diff --git a/hw/pixel_ops.h b/hw/pixel_ops.h
57index d390adf..9100b5c 100644
58--- a/hw/pixel_ops.h
59+++ b/hw/pixel_ops.h
60@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g,
61 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
62 }
63
64+static inline unsigned int rgb_to_pixel8bgr(unsigned int r, unsigned int g,
65+ unsigned int b)
66+{
67+ return ((b >> 5) << 5) | ((g >> 5) << 2) | (r >> 6);
68+}
69+
70 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
71 unsigned int b)
72 {
73diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
74index d1cba28..c918afb 100644
75--- a/hw/vmware_vga.c
76+++ b/hw/vmware_vga.c
77@@ -484,6 +484,8 @@ static inline void vmsvga_cursor_define(struct vmsvga_state_s *s,
78
79 #define CMD(f) le32_to_cpu(s->cmd->f)
80
81+static uint32_t last_cmd;
82+
83 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
84 {
85 if (!s->config || !s->enable)
86@@ -493,11 +495,18 @@ static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
87
88 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
89 {
90- uint32_t cmd = s->fifo[CMD(stop) >> 2];
91- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
92- if (CMD(stop) >= CMD(max))
93+ int offset = CMD(stop);
94+
95+ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
96+ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
97+ __FUNCTION__, last_cmd);
98+ return 0x00000000;
99+ }
100+
101+ s->cmd->stop = cpu_to_le32(offset + 4);
102+ if (offset + 4 >= CMD(max))
103 s->cmd->stop = s->cmd->min;
104- return cmd;
105+ return s->fifo[offset >> 2];
106 }
107
108 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
109@@ -507,12 +516,12 @@ static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
110
111 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
112 {
113- uint32_t cmd, colour;
114+ uint32_t colour;
115 int args = 0;
116 int x, y, dx, dy, width, height;
117 struct vmsvga_cursor_definition_s cursor;
118 while (!vmsvga_fifo_empty(s))
119- switch (cmd = vmsvga_fifo_read(s)) {
120+ switch (last_cmd = vmsvga_fifo_read(s)) {
121 case SVGA_CMD_UPDATE:
122 case SVGA_CMD_UPDATE_VERBOSE:
123 x = vmsvga_fifo_read(s);
124@@ -612,7 +621,7 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
125 while (args --)
126 vmsvga_fifo_read(s);
127 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
128- __FUNCTION__, cmd);
129+ __FUNCTION__, last_cmd);
130 break;
131 }
132
133@@ -914,8 +923,9 @@ static void vmsvga_reset(struct vmsvga_state_s *s)
134 s->width = -1;
135 s->height = -1;
136 s->svgaid = SVGA_ID;
137- s->depth = 24;
138+ s->depth = 32;
139 s->bypp = (s->depth + 7) >> 3;
140+ s->bypp = 4; /* XXX: until we can get host's actual depth */
141 s->cursor.on = 0;
142 s->redraw_fifo_first = 0;
143 s->redraw_fifo_last = 0;
144@@ -1140,6 +1150,12 @@ static void vmsvga_init(struct vmsvga_state_s *s,
145 /* XXX: use optimized standard vga accesses */
146 cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
147 vga_ram_size, vga_ram_offset);
148+
149+#ifdef EMBED_STDVGA
150+ s->map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
151+ s->map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
152+ vga_dirty_log_start((VGAState *) s);
153+#endif
154 #endif
155 }
156
157diff --git a/kqemu.c b/kqemu.c
158index 25f4ea7..09c761a 100644
159--- a/kqemu.c
160+++ b/kqemu.c
161@@ -93,6 +93,8 @@ uint8_t *modified_ram_pages_table;
162 int qpi_io_memory;
163 uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
164
165+extern int enable_gl;
166+
167 #define cpuid(index, eax, ebx, ecx, edx) \
168 asm volatile ("cpuid" \
169 : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
170@@ -860,6 +862,22 @@ int kqemu_cpu_exec(CPUState *env)
171 else
172 env->hflags &= ~HF_OSFXSR_MASK;
173
174+ /* OPENGL Stuff */
175+ if (enable_gl && ((env->hflags & HF_CPL_MASK) == 3)) {
176+ int index = (env->eip >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
177+ if (env->segs[R_CS].base != 0)
178+ fprintf(stderr, "env->segs[R_CS].base != 0 !\n");
179+ else if (__builtin_expect(env->tlb_table[1][index].addr_code !=
180+ (env->eip & TARGET_PAGE_MASK), 0))
181+ ldub_code(env->eip);
182+
183+ if (env->tlb_table[1][index].addend) {
184+ unsigned char *ptr = env->eip + env->tlb_table[1][index].addend;
185+ if (ptr[0] == 0xcd && ptr[1] == 0x99)
186+ helper_opengl();
187+ }
188+ }
189+
190 LOG_INT("kqemu: kqemu_cpu_exec: ret=0x%x\n", ret);
191 if (ret == KQEMU_RET_SYSCALL) {
192 /* syscall instruction */
193diff --git a/qemu-char.c b/qemu-char.c
194index 64d41d0..424ea9b 100644
195--- a/qemu-char.c
196+++ b/qemu-char.c
197@@ -2112,6 +2112,69 @@ static CharDriverState *qemu_chr_open_tcp(const char *host_str,
198 return NULL;
199 }
200
201+#define TARGET_OPENGL_OK
202+#if defined(TARGET_OPENGL_OK)
203+static uint8_t buffer[32];
204+static int buffer_len;
205+static int hexdigit[128] = {
206+ ['0'] = 0x0,
207+ ['1'] = 0x1,
208+ ['2'] = 0x2,
209+ ['3'] = 0x3,
210+ ['4'] = 0x4,
211+ ['5'] = 0x5,
212+ ['6'] = 0x6,
213+ ['7'] = 0x7,
214+ ['8'] = 0x8,
215+ ['9'] = 0x9,
216+ ['a'] = 0xa,
217+ ['b'] = 0xb,
218+ ['c'] = 0xc,
219+ ['d'] = 0xd,
220+ ['e'] = 0xe,
221+ ['f'] = 0xf,
222+};
223+
224+static int opengl_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
225+{
226+ uint64_t ptr = 0;
227+ int i;
228+
229+ if (memchr(buf, 'x', len))
230+ opengl_process_enable();
231+ return len;
232+ memcpy(buffer + buffer_len, buf, len);
233+ buffer_len += len;
234+
235+ if (buffer_len >= 16) {
236+ for (i = 0; i < 16; i ++)
237+ ptr = (ptr << 4) + hexdigit[buffer[i]];
238+
239+ buffer_len -= 16;
240+ if (buffer_len)
241+ memcpy(buffer, buffer + 16, buffer_len);
242+
243+ mem_opengl(ptr);
244+ }
245+
246+ return len;
247+}
248+
249+CharDriverState *qemu_chr_open_opengl(void)
250+{
251+ CharDriverState *chr = qemu_mallocz(sizeof(CharDriverState));
252+
253+ chr->opaque = chr;
254+ chr->chr_write = opengl_chr_write;
255+
256+ qemu_chr_reset(chr);
257+
258+ return chr;
259+}
260+#else
261+#define qemu_chr_open_opengl() 0
262+#endif
263+
264 CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s))
265 {
266 const char *p;
267@@ -2192,6 +2255,9 @@ CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*i
268 chr = chr_baum_init();
269 } else
270 #endif
271+ if (!strcmp(filename, "opengl")) {
272+ chr = qemu_chr_open_opengl();
273+ } else
274 {
275 chr = NULL;
276 }
277diff --git a/sdl.c b/sdl.c
278index 74f084c..b78f754 100644
279--- a/sdl.c
280+++ b/sdl.c
281@@ -54,6 +54,8 @@ static int guest_cursor = 0;
282 static int guest_x, guest_y;
283 static SDL_Cursor *guest_sprite = 0;
284
285+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
286+
287 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
288 {
289 SDL_Rect rec;
290@@ -85,7 +87,9 @@ static void sdl_setdata(DisplayState *ds)
291
292 static void sdl_resize(DisplayState *ds)
293 {
294+ SDL_SysWMinfo info;
295 int flags;
296+ static Display *dpy;
297
298 // printf("resizing to %d %d\n", w, h);
299
300@@ -104,6 +108,13 @@ static void sdl_resize(DisplayState *ds)
301 }
302
303 sdl_setdata(ds);
304+
305+ SDL_GetWMInfo(&info);
306+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
307+ (!dpy || dpy == info.info.x11.display)) {
308+ dpy = info.info.x11.display;
309+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
310+ }
311 }
312
313 /* generic keyboard conversion */
314@@ -320,7 +331,7 @@ static void sdl_show_cursor(void)
315
316 if (!kbd_mouse_is_absolute()) {
317 SDL_ShowCursor(1);
318- if (guest_cursor &&
319+ if (guest_cursor && !force_pointer &&
320 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
321 SDL_SetCursor(guest_sprite);
322 else
323@@ -331,7 +342,8 @@ static void sdl_show_cursor(void)
324 static void sdl_grab_start(void)
325 {
326 if (guest_cursor) {
327- SDL_SetCursor(guest_sprite);
328+ if (!force_pointer)
329+ SDL_SetCursor(guest_sprite);
330 if (!kbd_mouse_is_absolute() && !absolute_enabled)
331 SDL_WarpMouse(guest_x, guest_y);
332 } else
333@@ -372,8 +384,8 @@ static void sdl_send_mouse_event(int dx, int dy, int dz, int x, int y, int state
334 absolute_enabled = 1;
335 }
336
337- dx = x * 0x7FFF / (width - 1);
338- dy = y * 0x7FFF / (height - 1);
339+ dx = x * 0x7FFF / (width - 1);
340+ dy = y * 0x7FFF / (height - 1);
341 } else if (absolute_enabled) {
342 sdl_show_cursor();
343 absolute_enabled = 0;
344@@ -603,7 +615,8 @@ static void sdl_mouse_warp(int x, int y, int on)
345 if (!guest_cursor)
346 sdl_show_cursor();
347 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
348- SDL_SetCursor(guest_sprite);
349+ if (!force_pointer)
350+ SDL_SetCursor(guest_sprite);
351 if (!kbd_mouse_is_absolute() && !absolute_enabled)
352 SDL_WarpMouse(x, y);
353 }
354@@ -628,6 +641,10 @@ static void sdl_mouse_define(int width, int height, int bpp,
355 line = image;
356 for (x = 0; x < width; x ++, dst ++) {
357 switch (bpp) {
358+ case 32:
359+ src = *(line ++); src |= *(line ++);
360+ src = *(line ++); src |= *(line ++);
361+ break;
362 case 24:
363 src = *(line ++); src |= *(line ++); src |= *(line ++);
364 break;
365@@ -654,7 +671,7 @@ static void sdl_mouse_define(int width, int height, int bpp,
366 }
367 guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y);
368
369- if (guest_cursor &&
370+ if (guest_cursor && !force_pointer &&
371 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
372 SDL_SetCursor(guest_sprite);
373 }
374@@ -670,6 +687,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
375 {
376 int flags;
377 uint8_t data = 0;
378+ SDL_SysWMinfo info;
379
380 #if defined(__APPLE__)
381 /* always use generic keymaps */
382@@ -691,6 +709,12 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
383 exit(1);
384 }
385
386+ SDL_GetWMInfo(&info);
387+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
388+ opengl_exec_set_parent_window(info.info.x11.display,
389+ RootWindow(info.info.x11.display,
390+ DefaultScreen(info.info.x11.display)));
391+
392 dcl = qemu_mallocz(sizeof(DisplayChangeListener));
393 dcl->dpy_update = sdl_update;
394 dcl->dpy_resize = sdl_resize;
395@@ -714,4 +738,9 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
396 gui_fullscreen_initial_grab = 1;
397 sdl_grab_start();
398 }
399+
400+ SDL_GetWMInfo(&info);
401+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
402+ opengl_exec_set_parent_window(info.info.x11.display,
403+ info.info.x11.window);
404 }
405diff --git a/slirp/ctl.h b/slirp/ctl.h
406index 4a8576d..201ae4b 100644
407--- a/slirp/ctl.h
408+++ b/slirp/ctl.h
409@@ -2,6 +2,7 @@
410 #define CTL_EXEC 1
411 #define CTL_ALIAS 2
412 #define CTL_DNS 3
413+#define CTL_OPENGL 6
414
415 #define CTL_SPECIAL "10.0.2.0"
416 #define CTL_LOCAL "10.0.2.15"
417diff --git a/slirp/udp.c b/slirp/udp.c
418index 8d3bdd2..e5f40cc 100644
419--- a/slirp/udp.c
420+++ b/slirp/udp.c
421@@ -40,6 +40,7 @@
422
423 #include <slirp.h>
424 #include "ip_icmp.h"
425+#include "bswap.h"
426
427 #ifdef LOG_ENABLED
428 struct udpstat udpstat;
429@@ -153,6 +154,11 @@ udp_input(m, iphlen)
430 goto bad;
431 }
432
433+ if (ntohs(uh->uh_dport) == 9999 && m->m_len - iphlen == 16) {
434+ mem_opengl(le64_to_cpup((uint64_t *) (m->m_data + iphlen + 8)));
435+ goto bad;
436+ }
437+
438 if (slirp_restrict)
439 goto bad;
440
441diff --git a/sysemu.h b/sysemu.h
442index 57217c1..f0a48cd 100644
443--- a/sysemu.h
444+++ b/sysemu.h
445@@ -96,6 +96,7 @@ extern int graphic_rotate;
446 extern int no_quit;
447 extern int semihosting_enabled;
448 extern int old_param;
449+extern int force_pointer;
450 extern const char *bootp_filename;
451
452 #ifdef USE_KQEMU
453diff --git a/target-i386/beginend_funcs.sh b/target-i386/beginend_funcs.sh
454new file mode 100755
455index 0000000..bdd7684
456--- /dev/null
457+++ b/target-i386/beginend_funcs.sh
458@@ -0,0 +1,23 @@
459+#! /bin/sh
460+# Copyright 2008 (C) Intel Corporation
461+#
462+# echo names of functions that are legal between a glBegin and glEnd pair.
463+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
464+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
465+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
466+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
467+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
468+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
469+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
470+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
471+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
472+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
473+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
474+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
475+echo -e MAGIC_MACRO\(glArrayElement\)\\n
476+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
477+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
478+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
479+echo -e MAGIC_MACRO\(glCallList\)\\n
480+echo -e MAGIC_MACRO\(glCallLists\)\\n
481+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
482diff --git a/target-i386/ghash.c b/target-i386/ghash.c
483new file mode 100644
484index 0000000..1f0c380
485--- /dev/null
486+++ b/target-i386/ghash.c
487@@ -0,0 +1,347 @@
488+/* This is a modified and simplified version of original ghash.c */
489+
490+/* GLIB - Library of useful routines for C programming
491+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
492+ *
493+ * This library is free software; you can redistribute it and/or
494+ * modify it under the terms of the GNU Lesser General Public
495+ * License as published by the Free Software Foundation; either
496+ * version 2 of the License, or (at your option) any later version.
497+ *
498+ * This library is distributed in the hope that it will be useful,
499+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
500+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
501+ * Lesser General Public License for more details.
502+ *
503+ * You should have received a copy of the GNU Lesser General Public
504+ * License along with this library; if not, write to the
505+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
506+ * Boston, MA 02111-1307, USA.
507+ */
508+
509+/*
510+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
511+ * file for a list of people on the GLib Team. See the ChangeLog
512+ * files for a list of changes. These files are distributed with
513+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
514+ */
515+
516+
517+#include <stdlib.h>
518+
519+#include "ghash.h"
520+
521+#define HASH_TABLE_MIN_SIZE 11
522+#define HASH_TABLE_MAX_SIZE 13845163
523+
524+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
525+
526+
527+typedef struct _SimpleHashNode SimpleHashNode;
528+
529+struct _SimpleHashNode
530+{
531+ int key;
532+ void* value;
533+ SimpleHashNode *next;
534+};
535+
536+struct _SimpleHashTable
537+{
538+ int size;
539+ int nnodes;
540+ SimpleHashNode **nodes;
541+ SimpleDestroyNotify value_destroy_func;
542+};
543+
544+static const unsigned int simple_primes[] =
545+{
546+ 11,
547+ 19,
548+ 37,
549+ 73,
550+ 109,
551+ 163,
552+ 251,
553+ 367,
554+ 557,
555+ 823,
556+ 1237,
557+ 1861,
558+ 2777,
559+ 4177,
560+ 6247,
561+ 9371,
562+ 14057,
563+ 21089,
564+ 31627,
565+ 47431,
566+ 71143,
567+ 106721,
568+ 160073,
569+ 240101,
570+ 360163,
571+ 540217,
572+ 810343,
573+ 1215497,
574+ 1823231,
575+ 2734867,
576+ 4102283,
577+ 6153409,
578+ 9230113,
579+ 13845163,
580+};
581+
582+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
583+
584+unsigned int simple_spaced_primes_closest (unsigned int num)
585+{
586+ int i;
587+
588+ for (i = 0; i < simple_nprimes; i++)
589+ if (simple_primes[i] > num)
590+ return simple_primes[i];
591+
592+ return simple_primes[simple_nprimes - 1];
593+}
594+
595+#define HASH_TABLE_RESIZE(hash_table) \
596+ do { \
597+ if ((hash_table->size >= 3 * hash_table->nnodes && \
598+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
599+ (3 * hash_table->size <= hash_table->nnodes && \
600+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
601+ simple_hash_table_resize (hash_table); \
602+ } while(0)
603+
604+static void simple_hash_table_resize (SimpleHashTable *hash_table);
605+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
606+ int key);
607+static SimpleHashNode* simple_hash_node_new (int key,
608+ void* value);
609+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
610+ SimpleDestroyNotify value_destroy_func);
611+
612+
613+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
614+
615+SimpleHashTable*
616+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
617+{
618+ SimpleHashTable *hash_table;
619+
620+ hash_table = alloc0(SimpleHashTable, 1);
621+ hash_table->size = HASH_TABLE_MIN_SIZE;
622+ hash_table->nnodes = 0;
623+ hash_table->value_destroy_func = value_destroy_func;
624+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
625+
626+ return hash_table;
627+}
628+
629+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
630+ SimpleCloneValue clone_value_func)
631+{
632+ SimpleHashTable *hash_table_new;
633+ SimpleHashNode *new_node;
634+ SimpleHashNode *node;
635+ int i;
636+
637+ hash_table_new = alloc0 (SimpleHashTable, 1);
638+ hash_table_new->size = hash_table->size;
639+ hash_table_new->nnodes = hash_table->nnodes;
640+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
641+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
642+ for (i = 0; i < hash_table->size; i++)
643+ {
644+ node = hash_table->nodes[i];
645+ while(node)
646+ {
647+ SimpleHashNode *next = hash_table_new->nodes[i];
648+ new_node = simple_hash_node_new(node->key,
649+ (clone_value_func)? clone_value_func(node->value) : node->value);
650+ new_node->next = next;
651+ hash_table_new->nodes[i] = new_node;
652+ node = node->next;
653+ }
654+ }
655+ return hash_table_new;
656+}
657+
658+void
659+simple_hash_table_destroy (SimpleHashTable *hash_table)
660+{
661+ int i;
662+
663+ for (i = 0; i < hash_table->size; i++)
664+ {
665+ simple_hash_nodes_destroy (hash_table->nodes[i],
666+ hash_table->value_destroy_func);
667+ hash_table->nodes[i] = NULL;
668+ }
669+ free (hash_table->nodes);
670+ free (hash_table);
671+}
672+
673+static inline SimpleHashNode**
674+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
675+ int key)
676+{
677+ SimpleHashNode **node;
678+
679+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
680+ while (*node && (*node)->key != key)
681+ node = &(*node)->next;
682+
683+ return node;
684+}
685+
686+void*
687+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
688+{
689+ SimpleHashNode *node;
690+
691+ node = *simple_hash_table_lookup_node (hash_table, key);
692+
693+ return node ? node->value : NULL;
694+}
695+
696+void**
697+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
698+{
699+ SimpleHashNode *node;
700+
701+ node = *simple_hash_table_lookup_node (hash_table, key);
702+
703+ return node ? &node->value : NULL;
704+}
705+
706+
707+void
708+simple_hash_table_insert (SimpleHashTable *hash_table,
709+ int key,
710+ void* value)
711+{
712+ SimpleHashNode **node;
713+
714+ node = simple_hash_table_lookup_node (hash_table, key);
715+
716+ if (*node)
717+ {
718+ /* do not reset node->key in this place, keeping
719+ * the old key is the intended behaviour.
720+ * simple_hash_table_replace() can be used instead.
721+ */
722+ if (hash_table->value_destroy_func)
723+ hash_table->value_destroy_func ((*node)->value);
724+
725+ (*node)->value = value;
726+ }
727+ else
728+ {
729+ *node = simple_hash_node_new (key, value);
730+ hash_table->nnodes++;
731+ HASH_TABLE_RESIZE (hash_table);
732+ }
733+}
734+int
735+simple_hash_table_remove (SimpleHashTable *hash_table,
736+ int key)
737+{
738+ SimpleHashNode **node, *dest;
739+
740+ node = simple_hash_table_lookup_node (hash_table, key);
741+ if (*node)
742+ {
743+ dest = *node;
744+ (*node) = dest->next;
745+ if (hash_table->value_destroy_func)
746+ hash_table->value_destroy_func (dest->value);
747+ free (dest);
748+ hash_table->nnodes--;
749+
750+ HASH_TABLE_RESIZE (hash_table);
751+
752+ return 1;
753+ }
754+
755+ return 0;
756+}
757+
758+
759+void
760+simple_hash_table_foreach (SimpleHashTable *hash_table,
761+ SimpleHFunc func,
762+ void* user_data)
763+{
764+ SimpleHashNode *node;
765+ int i;
766+
767+ for (i = 0; i < hash_table->size; i++)
768+ for (node = hash_table->nodes[i]; node; node = node->next)
769+ (* func) (node->key, node->value, user_data);
770+}
771+
772+unsigned int
773+simple_hash_table_size (SimpleHashTable *hash_table)
774+{
775+ return hash_table->nnodes;
776+}
777+
778+static void
779+simple_hash_table_resize (SimpleHashTable *hash_table)
780+{
781+ SimpleHashNode **new_nodes;
782+ SimpleHashNode *node;
783+ SimpleHashNode *next;
784+ unsigned int hash_val;
785+ int new_size;
786+ int i;
787+
788+ new_size = simple_spaced_primes_closest (hash_table->nnodes);
789+ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
790+
791+ new_nodes = alloc0 (SimpleHashNode*, new_size);
792+
793+ for (i = 0; i < hash_table->size; i++)
794+ for (node = hash_table->nodes[i]; node; node = next)
795+ {
796+ next = node->next;
797+
798+ hash_val = (unsigned int)(node->key) % new_size;
799+
800+ node->next = new_nodes[hash_val];
801+ new_nodes[hash_val] = node;
802+ }
803+
804+ free (hash_table->nodes);
805+ hash_table->nodes = new_nodes;
806+ hash_table->size = new_size;
807+}
808+
809+static SimpleHashNode*
810+simple_hash_node_new (int key,
811+ void* value)
812+{
813+ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
814+
815+ hash_node->key = key;
816+ hash_node->value = value;
817+ hash_node->next = NULL;
818+
819+ return hash_node;
820+}
821+
822+static void
823+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
824+ SimpleDestroyNotify value_destroy_func)
825+{
826+ while (hash_node)
827+ {
828+ SimpleHashNode *next = hash_node->next;
829+ if (value_destroy_func)
830+ value_destroy_func (hash_node->value);
831+ free (hash_node);
832+ hash_node = next;
833+ }
834+}
835diff --git a/target-i386/ghash.h b/target-i386/ghash.h
836new file mode 100644
837index 0000000..7f34436
838--- /dev/null
839+++ b/target-i386/ghash.h
840@@ -0,0 +1,59 @@
841+/* This is a modified and simplified version of original ghash.h */
842+
843+
844+/* GLIB - Library of useful routines for C programming
845+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
846+ *
847+ * This library is free software; you can redistribute it and/or
848+ * modify it under the terms of the GNU Lesser General Public
849+ * License as published by the Free Software Foundation; either
850+ * version 2 of the License, or (at your option) any later version.
851+ *
852+ * This library is distributed in the hope that it will be useful,
853+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
854+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
855+ * Lesser General Public License for more details.
856+ *
857+ * You should have received a copy of the GNU Lesser General Public
858+ * License along with this library; if not, write to the
859+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
860+ * Boston, MA 02111-1307, USA.
861+ */
862+
863+/*
864+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
865+ * file for a list of people on the GLib Team. See the ChangeLog
866+ * files for a list of changes. These files are distributed with
867+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
868+ */
869+
870+#ifndef __SIMPLE_HASH_H__
871+#define __SIMPLE_HASH_H__
872+
873+typedef struct _SimpleHashTable SimpleHashTable;
874+
875+typedef void (*SimpleDestroyNotify)(void*);
876+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
877+typedef void* (*SimpleCloneValue)(void* value);
878+
879+/* Hash tables
880+ */
881+SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
882+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
883+ SimpleCloneValue clone_value_func);
884+void simple_hash_table_destroy (SimpleHashTable *hash_table);
885+void simple_hash_table_insert (SimpleHashTable *hash_table,
886+ int key,
887+ void* value);
888+int simple_hash_table_remove (SimpleHashTable *hash_table,
889+ int key);
890+void* simple_hash_table_lookup (SimpleHashTable *hash_table,
891+ int key);
892+void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
893+void simple_hash_table_foreach (SimpleHashTable *hash_table,
894+ SimpleHFunc func,
895+ void* user_data);
896+unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
897+
898+#endif /* __SIMPLE_HASH_H__ */
899+
900diff --git a/target-i386/gl_func_perso.h b/target-i386/gl_func_perso.h
901new file mode 100644
902index 0000000..401c0a8
903--- /dev/null
904+++ b/target-i386/gl_func_perso.h
905@@ -0,0 +1,135 @@
906+/*
907+ * Hand-implemented GL/GLX API
908+ *
909+ * Copyright (c) 2006,2007 Even Rouault
910+ *
911+ * Permission is hereby granted, free of charge, to any person obtaining a copy
912+ * of this software and associated documentation files (the "Software"), to deal
913+ * in the Software without restriction, including without limitation the rights
914+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
915+ * copies of the Software, and to permit persons to whom the Software is
916+ * furnished to do so, subject to the following conditions:
917+ *
918+ * The above copyright notice and this permission notice shall be included in
919+ * all copies or substantial portions of the Software.
920+ *
921+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
922+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
923+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
924+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
925+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
926+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
927+ * THE SOFTWARE.
928+ */
929+
930+MAGIC_MACRO(_init32),
931+MAGIC_MACRO(_init64),
932+MAGIC_MACRO(_synchronize),
933+MAGIC_MACRO(_serialized_calls),
934+MAGIC_MACRO(_exit_process),
935+MAGIC_MACRO(_moveResizeWindow),
936+MAGIC_MACRO(_changeWindowState),
937+MAGIC_MACRO(_send_cursor),
938+
939+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
940+MAGIC_MACRO(glXChooseVisual),
941+MAGIC_MACRO(glXQueryExtensionsString),
942+MAGIC_MACRO(glXQueryServerString),
943+MAGIC_MACRO(glXCreateContext),
944+MAGIC_MACRO(glXCopyContext),
945+MAGIC_MACRO(glXDestroyContext),
946+MAGIC_MACRO(glXGetClientString),
947+MAGIC_MACRO(glXQueryVersion),
948+MAGIC_MACRO(glXMakeCurrent),
949+MAGIC_MACRO(glXGetConfig),
950+MAGIC_MACRO(glXGetConfig_extended),
951+MAGIC_MACRO(glXWaitGL),
952+MAGIC_MACRO(glXWaitX),
953+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
954+MAGIC_MACRO(glXChooseFBConfig),
955+MAGIC_MACRO(glXChooseFBConfigSGIX),
956+MAGIC_MACRO(glXGetFBConfigs),
957+MAGIC_MACRO(glXCreatePbuffer),
958+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
959+MAGIC_MACRO(glXDestroyPbuffer),
960+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
961+MAGIC_MACRO(glXCreateNewContext),
962+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
963+MAGIC_MACRO(glXGetVisualFromFBConfig),
964+MAGIC_MACRO(glXGetFBConfigAttrib),
965+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
966+MAGIC_MACRO(glXQueryContext),
967+MAGIC_MACRO(glXQueryDrawable),
968+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
969+MAGIC_MACRO(glXUseXFont),
970+MAGIC_MACRO(glXIsDirect),
971+MAGIC_MACRO(glXGetProcAddress_fake),
972+MAGIC_MACRO(glXGetProcAddress_global_fake),
973+MAGIC_MACRO(glXSwapBuffers),
974+MAGIC_MACRO(glXQueryExtension),
975+MAGIC_MACRO(glXGetScreenDriver),
976+MAGIC_MACRO(glXGetDriverConfig),
977+MAGIC_MACRO(glXSwapIntervalSGI),
978+MAGIC_MACRO(glXBindTexImageATI),
979+MAGIC_MACRO(glXReleaseTexImageATI),
980+MAGIC_MACRO(glXBindTexImageARB),
981+MAGIC_MACRO(glXReleaseTexImageARB),
982+
983+MAGIC_MACRO(glGetString),
984+
985+MAGIC_MACRO(glShaderSourceARB_fake),
986+MAGIC_MACRO(glShaderSource_fake),
987+MAGIC_MACRO(glVertexPointer_fake),
988+MAGIC_MACRO(glNormalPointer_fake),
989+MAGIC_MACRO(glColorPointer_fake),
990+MAGIC_MACRO(glSecondaryColorPointer_fake),
991+MAGIC_MACRO(glIndexPointer_fake),
992+MAGIC_MACRO(glTexCoordPointer_fake),
993+MAGIC_MACRO(glEdgeFlagPointer_fake),
994+MAGIC_MACRO(glVertexAttribPointerARB_fake),
995+MAGIC_MACRO(glVertexAttribPointerNV_fake),
996+MAGIC_MACRO(glWeightPointerARB_fake),
997+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
998+MAGIC_MACRO(glFogCoordPointer_fake),
999+MAGIC_MACRO(glVariantPointerEXT_fake),
1000+MAGIC_MACRO(glInterleavedArrays_fake),
1001+MAGIC_MACRO(glElementPointerATI_fake),
1002+MAGIC_MACRO(glTuxRacerDrawElements_fake),
1003+MAGIC_MACRO(glVertexAndNormalPointer_fake),
1004+MAGIC_MACRO(glTexCoordPointer01_fake),
1005+MAGIC_MACRO(glTexCoordPointer012_fake),
1006+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
1007+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
1008+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
1009+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
1010+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
1011+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
1012+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
1013+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
1014+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
1015+MAGIC_MACRO(glGenTextures_fake),
1016+MAGIC_MACRO(glGenBuffersARB_fake),
1017+MAGIC_MACRO(glGenLists_fake),
1018+MAGIC_MACRO(_glDrawElements_buffer),
1019+MAGIC_MACRO(_glDrawRangeElements_buffer),
1020+MAGIC_MACRO(_glMultiDrawElements_buffer),
1021+MAGIC_MACRO(_glVertexPointer_buffer),
1022+MAGIC_MACRO(_glNormalPointer_buffer),
1023+MAGIC_MACRO(_glColorPointer_buffer),
1024+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
1025+MAGIC_MACRO(_glIndexPointer_buffer),
1026+MAGIC_MACRO(_glTexCoordPointer_buffer),
1027+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
1028+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
1029+MAGIC_MACRO(_glWeightPointerARB_buffer),
1030+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
1031+MAGIC_MACRO(_glFogCoordPointer_buffer),
1032+MAGIC_MACRO(_glVariantPointerEXT_buffer),
1033+MAGIC_MACRO(_glGetError_fake),
1034+MAGIC_MACRO(_glReadPixels_pbo),
1035+MAGIC_MACRO(_glDrawPixels_pbo),
1036+MAGIC_MACRO(_glMapBufferARB_fake),
1037+MAGIC_MACRO(_glSelectBuffer_fake),
1038+MAGIC_MACRO(_glGetSelectBuffer_fake),
1039+MAGIC_MACRO(_glFeedbackBuffer_fake),
1040+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
1041diff --git a/target-i386/helper.c b/target-i386/helper.c
1042index e714994..7354220 100644
1043--- a/target-i386/helper.c
1044+++ b/target-i386/helper.c
1045@@ -1320,7 +1320,7 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
1046 }
1047
1048 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
1049- paddr = (pte & TARGET_PAGE_MASK) + page_offset;
1050+ paddr = (pte & PHYS_ADDR_MASK) + page_offset;
1051 return paddr;
1052 }
1053
1054diff --git a/target-i386/helper.h b/target-i386/helper.h
1055index 0c36783..b247b35 100644
1056--- a/target-i386/helper.h
1057+++ b/target-i386/helper.h
1058@@ -214,4 +214,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
1059 DEF_HELPER_2(rcrq, tl, tl, tl)
1060 #endif
1061
1062+DEF_HELPER_0(opengl, void)
1063+
1064 #include "def-helper.h"
1065diff --git a/target-i386/helper_opengl.c b/target-i386/helper_opengl.c
1066new file mode 100644
1067index 0000000..f83d02b
1068--- /dev/null
1069+++ b/target-i386/helper_opengl.c
1070@@ -0,0 +1,1205 @@
1071+/*
1072+ * Host-side implementation of GL/GLX API
1073+ *
1074+ * Copyright (c) 2006,2007 Even Rouault
1075+ *
1076+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1077+ * of this software and associated documentation files (the "Software"), to deal
1078+ * in the Software without restriction, including without limitation the rights
1079+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1080+ * copies of the Software, and to permit persons to whom the Software is
1081+ * furnished to do so, subject to the following conditions:
1082+ *
1083+ * The above copyright notice and this permission notice shall be included in
1084+ * all copies or substantial portions of the Software.
1085+ *
1086+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1087+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1088+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1089+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1090+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1091+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1092+ * THE SOFTWARE.
1093+ */
1094+#define _XOPEN_SOURCE 600
1095+#include <string.h>
1096+#include <stdlib.h>
1097+#include <assert.h>
1098+
1099+#include <X11/Xlib.h>
1100+#include <X11/Xutil.h>
1101+
1102+#include "exec.h"
1103+
1104+#if defined(CONFIG_USER_ONLY)
1105+void helper_opengl(void)
1106+{
1107+ /* TODO */
1108+}
1109+#else
1110+
1111+#include "opengl_func.h"
1112+
1113+#define ENABLE_GL_LOG
1114+
1115+extern FILE *stderr;
1116+
1117+extern void init_process_tab(void);
1118+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
1119+
1120+extern void sdl_set_opengl_window(int x, int y, int width, int height);
1121+
1122+static int last_process_id = 0;
1123+static int must_save = 0;
1124+
1125+static int allow_kernel = 0;
1126+
1127+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
1128+{
1129+ int is_user, index;
1130+
1131+ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
1132+ is_user = ((env->hflags & HF_CPL_MASK) == 3);
1133+ /* A sanity check for the int0x99 case */
1134+ if (unlikely(is_user == 0 && !allow_kernel)) {
1135+ fprintf(stderr, "not in userland !!!\n");
1136+ return NULL;
1137+ }
1138+ if (__builtin_expect
1139+ (env->tlb_table[is_user][index].addr_code !=
1140+ (addr & TARGET_PAGE_MASK), 0)) {
1141+ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
1142+
1143+ if (ret == -1) {
1144+ fprintf(stderr,
1145+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
1146+ TARGET_FMT_lx "\n", addr, ret);
1147+ fprintf(stderr,
1148+ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
1149+ TARGET_FMT_lx ")\n", addr,
1150+ env->tlb_table[is_user][index].addr_code,
1151+ addr & TARGET_PAGE_MASK);
1152+ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
1153+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
1154+ return NULL;
1155+ } else {
1156+ if (ret + TARGET_PAGE_SIZE <= phys_ram_size) {
1157+ return phys_ram_base + ret +
1158+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1));
1159+ } else {
1160+ fprintf(stderr,
1161+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
1162+ TARGET_FMT_lx "\n", addr, ret);
1163+ fprintf(stderr,
1164+ "ret=" TARGET_FMT_lx " phys_ram_size= " TARGET_FMT_lx
1165+ "\n", ret, (target_ulong) phys_ram_size);
1166+ return NULL;
1167+ }
1168+ }
1169+ } else
1170+ return (void *) (addr + env->tlb_table[is_user][index].addend);
1171+}
1172+
1173+#ifndef MIN
1174+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
1175+#endif
1176+
1177+enum {
1178+ NOT_MAPPED,
1179+ MAPPED_CONTIGUOUS,
1180+ MAPPED_NOT_CONTIGUOUS
1181+};
1182+
1183+#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
1184+
1185+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
1186+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
1187+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
1188+static int get_target_mem_state(const CPUState *env,
1189+ target_ulong target_addr, int len)
1190+{
1191+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1192+ int to_end_page =
1193+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1194+ int ret = MAPPED_CONTIGUOUS;
1195+
1196+ if (aligned_target_addr != target_addr) {
1197+ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
1198+ void *last_phys_addr = phys_addr;
1199+
1200+ if (phys_addr == 0) {
1201+ return NOT_MAPPED;
1202+ }
1203+ if (len > to_end_page) {
1204+ len -= to_end_page;
1205+ aligned_target_addr += TARGET_PAGE_SIZE;
1206+ int i;
1207+
1208+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1209+ void *phys_addr =
1210+ get_phys_mem_addr(env, aligned_target_addr + i);
1211+ if (phys_addr == 0) {
1212+ return NOT_MAPPED;
1213+ }
1214+ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1215+ ret = MAPPED_NOT_CONTIGUOUS;
1216+ last_phys_addr = phys_addr;
1217+ }
1218+ }
1219+ } else {
1220+ void *last_phys_addr = NULL;
1221+ int i;
1222+
1223+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1224+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1225+
1226+ if (phys_addr == 0) {
1227+ return NOT_MAPPED;
1228+ }
1229+ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1230+ ret = MAPPED_NOT_CONTIGUOUS;
1231+ last_phys_addr = phys_addr;
1232+ }
1233+ }
1234+ return ret;
1235+}
1236+
1237+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
1238+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
1239+static int memcpy_host_to_target(const CPUState *env,
1240+ target_ulong target_addr,
1241+ const void *host_addr, int len)
1242+{
1243+ int i;
1244+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1245+ int to_end_page =
1246+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1247+ int ret = get_target_mem_state(env, target_addr, len);
1248+
1249+ if (ret == NOT_MAPPED) {
1250+ return 0;
1251+ }
1252+
1253+ if (ret == MAPPED_CONTIGUOUS) {
1254+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1255+
1256+ memcpy(phys_addr, host_addr, len);
1257+ } else {
1258+ if (aligned_target_addr != target_addr) {
1259+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1260+
1261+ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
1262+ if (len <= to_end_page) {
1263+ return 1;
1264+ }
1265+ len -= to_end_page;
1266+ host_addr += to_end_page;
1267+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1268+ }
1269+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1270+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1271+
1272+ memcpy(phys_addr, host_addr + i,
1273+ (i + TARGET_PAGE_SIZE <=
1274+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1275+ }
1276+ }
1277+
1278+ return 1;
1279+}
1280+
1281+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
1282+ target_ulong target_addr, int len)
1283+{
1284+ int i;
1285+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1286+ int to_end_page =
1287+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1288+ int ret = get_target_mem_state(env, target_addr, len);
1289+
1290+ if (ret == NOT_MAPPED) {
1291+ return 0;
1292+ }
1293+
1294+ if (ret == MAPPED_CONTIGUOUS) {
1295+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1296+
1297+ memcpy(host_addr, phys_addr, len);
1298+ } else {
1299+ if (aligned_target_addr != target_addr) {
1300+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1301+
1302+ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
1303+ if (len <= to_end_page)
1304+ return 1;
1305+
1306+ len -= to_end_page;
1307+ host_addr += to_end_page;
1308+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1309+ }
1310+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1311+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1312+
1313+ memcpy(host_addr + i, phys_addr,
1314+ (i + TARGET_PAGE_SIZE <=
1315+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1316+ }
1317+ }
1318+
1319+ return 1;
1320+}
1321+
1322+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
1323+ target_ulong target_addr, int nb_args)
1324+{
1325+ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
1326+}
1327+
1328+static int wordsize = 0;
1329+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
1330+ target_ulong target_addr, int nb_args) =
1331+ memcpy_target_to_host_1_1;
1332+
1333+void do_disconnect_current(void);
1334+void do_context_switch(Display *dpy, pid_t pid, int call);
1335+
1336+static void disconnect_current(void)
1337+{
1338+ last_process_id = 0;
1339+
1340+ return do_disconnect_current();
1341+}
1342+
1343+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
1344+ target_ulong target_addr, int nb_args)
1345+{
1346+ int ret;
1347+ uint32_t args_temp[nb_args], *src = args_temp;
1348+ arg_t *dest = host_addr;
1349+
1350+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
1351+ if (!ret)
1352+ return ret;
1353+
1354+ while (nb_args) {
1355+ /* TODO: endianness */
1356+ *dest = 0;
1357+ *(uint32_t *) (dest++) = *src++;
1358+ nb_args--;
1359+ }
1360+
1361+ return ret;
1362+}
1363+
1364+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
1365+ target_ulong target_addr, int nb_args)
1366+{
1367+ int ret;
1368+ uint64_t args_temp[nb_args], *src = args_temp;
1369+ arg_t *dest = host_addr;
1370+
1371+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
1372+ if (!ret)
1373+ return ret;
1374+
1375+ while (nb_args) {
1376+ /* TODO: endianness */
1377+ *dest = 0;
1378+ *(uint64_t *) (dest++) = *src++;
1379+ nb_args--;
1380+ }
1381+
1382+ return ret;
1383+}
1384+
1385+static int host_offset = 0;
1386+static void reset_host_offset()
1387+{
1388+ host_offset = 0;
1389+}
1390+
1391+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
1392+/* Do not free or modify */
1393+static const void *get_host_read_pointer(const CPUState *env,
1394+ const target_ulong target_addr, int len)
1395+{
1396+ int ret = get_target_mem_state(env, target_addr, len);
1397+
1398+ if (ret == NOT_MAPPED) {
1399+ return NULL;
1400+ } else if (ret == MAPPED_CONTIGUOUS) {
1401+ return get_phys_mem_addr(env, target_addr);
1402+ } else {
1403+ static int host_mem_size = 0;
1404+ static void *host_mem = NULL;
1405+ static void *ret;
1406+
1407+ if (host_mem_size < host_offset + len) {
1408+ host_mem_size = 2 * host_mem_size + host_offset + len;
1409+ host_mem = realloc(host_mem, host_mem_size);
1410+ }
1411+ ret = host_mem + host_offset;
1412+ assert(memcpy_target_to_host(env, ret, target_addr, len));
1413+ host_offset += len;
1414+ return ret;
1415+ }
1416+}
1417+
1418+int doing_opengl = 0;
1419+static int last_func_number = -1;
1420+static size_t(*my_strlen) (const char *) = NULL;
1421+
1422+#ifdef ENABLE_GL_LOG
1423+static FILE *f = NULL;
1424+static int logger_pid = 0;
1425+
1426+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
1427+
1428+void write_gl_debug_cmd_int(int my_int)
1429+{
1430+ write_gl_debug_init();
1431+ fwrite(&my_int, sizeof(int), 1, f);
1432+ fflush(f);
1433+}
1434+
1435+void write_gl_debug_cmd_short(short my_int)
1436+{
1437+ write_gl_debug_init();
1438+ fwrite(&my_int, sizeof(short), 1, f);
1439+ fflush(f);
1440+}
1441+
1442+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
1443+{
1444+ write_gl_debug_init();
1445+ fwrite(&size, sizeof(int), 1, f);
1446+ if (size)
1447+ fwrite(buffer, size, 1, f);
1448+}
1449+
1450+static void inline write_gl_debug_cmd_buffer_without_size(
1451+ int size, void *buffer)
1452+{
1453+ write_gl_debug_init();
1454+ if (size)
1455+ fwrite(buffer, size, 1, f);
1456+}
1457+
1458+void write_gl_debug_end(void)
1459+{
1460+ write_gl_debug_init();
1461+ fclose(f);
1462+ f = NULL;
1463+ logger_pid = 0;
1464+ must_save = 0;
1465+}
1466+
1467+static inline int is_logging(int pid)
1468+{
1469+ return must_save && pid == logger_pid;
1470+}
1471+#endif
1472+
1473+#include <dlfcn.h>
1474+#include <signal.h>
1475+
1476+static void (*anticrash_handler) (void *) = NULL;
1477+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
1478+
1479+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
1480+{
1481+ static int counter = 0;
1482+
1483+ counter++;
1484+
1485+ printf("oops\n");
1486+
1487+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1488+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1489+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1490+ anticrash_handler(ptr);
1491+
1492+ counter--;
1493+}
1494+
1495+static int decode_call_int(CPUState *env, int func_number, int pid,
1496+ target_ulong target_ret_string,
1497+ target_ulong in_args, target_ulong in_args_size)
1498+{
1499+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
1500+ int ret_type = signature->ret_type;
1501+ /* int has_out_parameters = signature->has_out_parameters; */
1502+ int nb_args = signature->nb_args;
1503+ int *args_type = signature->args_type;
1504+ int i;
1505+ int ret;
1506+ int *args_size = NULL;
1507+ target_ulong saved_out_ptr[50];
1508+ static char *ret_string = NULL;
1509+ static arg_t args[50];
1510+ static Display *dpy = NULL;
1511+
1512+ if (dpy == NULL) {
1513+ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
1514+
1515+ if (handle) {
1516+ anticrash_handler = dlsym(handle, "anticrash_handler");
1517+ if (anticrash_handler) {
1518+ fprintf(stderr, "anticrash handler enabled\n");
1519+ struct sigaction sigsegv_action;
1520+ struct sigaction old_sigsegv_action;
1521+
1522+ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
1523+ sigemptyset(&(sigsegv_action.sa_mask));
1524+ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
1525+ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
1526+ }
1527+ }
1528+ handle = dlopen("libgetstack.so", RTLD_LAZY);
1529+ if (handle) {
1530+ show_stack_from_signal_handler =
1531+ dlsym(handle, "show_stack_from_signal_handler");
1532+ }
1533+
1534+ dpy = XOpenDisplay(NULL);
1535+ init_process_tab();
1536+ ret_string = malloc(32768);
1537+ my_strlen = strlen;
1538+ }
1539+
1540+ if (unlikely(last_func_number == _exit_process_func &&
1541+ func_number == _exit_process_func)) {
1542+ last_func_number = -1;
1543+ return 0;
1544+ }
1545+
1546+ if (last_process_id != pid) {
1547+ do_context_switch(dpy, pid, func_number);
1548+ last_process_id = pid;
1549+ }
1550+
1551+ if (unlikely(func_number == _exit_process_func))
1552+ last_process_id = 0;
1553+
1554+ if (!wordsize) {
1555+ if (func_number == _init32_func || func_number == _init64_func) {
1556+ if (func_number == _init32_func) {
1557+ wordsize = 32;
1558+ argcpy_target_to_host = memcpy_target32_to_host;
1559+ } else {
1560+ wordsize = 64;
1561+ argcpy_target_to_host = memcpy_target64_to_host;
1562+ }
1563+ } else
1564+ fprintf(stderr, "commands submitted before initialisation done\n");
1565+ }
1566+
1567+ reset_host_offset();
1568+
1569+ if (nb_args) {
1570+
1571+ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
1572+ fprintf(stderr, "call %s pid=%d\n",
1573+ tab_opengl_calls_name[func_number], pid);
1574+ fprintf(stderr, "cannot get call parameters\n");
1575+ disconnect_current();
1576+ return 0;
1577+ }
1578+
1579+ args_size =
1580+ (int *) get_host_read_pointer(env, in_args_size,
1581+ sizeof(int) * nb_args);
1582+ if (args_size == NULL) {
1583+ fprintf(stderr, "call %s pid=%d\n",
1584+ tab_opengl_calls_name[func_number], pid);
1585+ fprintf(stderr, "cannot get call parameters size\n");
1586+ disconnect_current();
1587+ return 0;
1588+ }
1589+ }
1590+
1591+ if (func_number == _serialized_calls_func) {
1592+ int command_buffer_size = args_size[0];
1593+ const void *command_buffer =
1594+ get_host_read_pointer(env, args[0], command_buffer_size);
1595+ int commmand_buffer_offset = 0;
1596+
1597+ args_size = NULL;
1598+#ifdef ENABLE_GL_LOG
1599+ if (is_logging(pid))
1600+ write_gl_debug_cmd_short(_serialized_calls_func);
1601+#endif
1602+
1603+ while (commmand_buffer_offset < command_buffer_size) {
1604+ func_number =
1605+ *(short *) (command_buffer + commmand_buffer_offset);
1606+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1607+ fprintf(stderr,
1608+ "func_number >= 0 && func_number < GL_N_CALLS failed at "
1609+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
1610+ commmand_buffer_offset, command_buffer_size);
1611+ return 0;
1612+ }
1613+ commmand_buffer_offset += sizeof(short);
1614+#ifdef ENABLE_GL_LOG
1615+ if (is_logging(pid))
1616+ write_gl_debug_cmd_short(func_number);
1617+#endif
1618+
1619+ signature = (Signature *) tab_opengl_calls[func_number];
1620+ ret_type = signature->ret_type;
1621+ assert(ret_type == TYPE_NONE);
1622+ nb_args = signature->nb_args;
1623+ args_type = signature->args_type;
1624+
1625+ for (i = 0; i < nb_args; i++) {
1626+ switch (args_type[i]) {
1627+ case TYPE_UNSIGNED_INT:
1628+ case TYPE_INT:
1629+ case TYPE_UNSIGNED_CHAR:
1630+ case TYPE_CHAR:
1631+ case TYPE_UNSIGNED_SHORT:
1632+ case TYPE_SHORT:
1633+ case TYPE_FLOAT:
1634+ {
1635+ args[i] =
1636+ *(int *) (command_buffer +
1637+ commmand_buffer_offset);
1638+#ifdef ENABLE_GL_LOG
1639+ if (is_logging(pid))
1640+ write_gl_debug_cmd_int(args[i]);
1641+#endif
1642+ commmand_buffer_offset += sizeof(int);
1643+ break;
1644+ }
1645+
1646+ case TYPE_NULL_TERMINATED_STRING:
1647+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1648+ {
1649+ int arg_size =
1650+ *(int *) (command_buffer +
1651+ commmand_buffer_offset);
1652+ commmand_buffer_offset += sizeof(int);
1653+
1654+ if (arg_size == 0) {
1655+ args[i] = 0;
1656+ } else {
1657+ args[i] =
1658+ (long) (command_buffer +
1659+ commmand_buffer_offset);
1660+ }
1661+
1662+ if (args[i] == 0) {
1663+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1664+ fprintf(stderr, "call %s arg %d pid=%d\n",
1665+ tab_opengl_calls_name[func_number], i,
1666+ pid);
1667+ disconnect_current();
1668+ return 0;
1669+ }
1670+ } else {
1671+ if (arg_size == 0) {
1672+ fprintf(stderr, "call %s arg %d pid=%d\n",
1673+ tab_opengl_calls_name[func_number], i,
1674+ pid);
1675+ fprintf(stderr, "args_size[i] == 0 !!\n");
1676+ disconnect_current();
1677+ return 0;
1678+ }
1679+ }
1680+#ifdef ENABLE_GL_LOG
1681+ if (is_logging(pid))
1682+ write_gl_debug_cmd_buffer_with_size(arg_size,
1683+ (void *)
1684+ args[i]);
1685+#endif
1686+ commmand_buffer_offset += arg_size;
1687+
1688+ break;
1689+ }
1690+
1691+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1692+ {
1693+ int arg_size =
1694+ compute_arg_length(stderr, func_number, i, args);
1695+ args[i] =
1696+ (arg_size) ? (long) (command_buffer +
1697+ commmand_buffer_offset) : 0;
1698+#ifdef ENABLE_GL_LOG
1699+ if (is_logging(pid))
1700+ write_gl_debug_cmd_buffer_without_size(arg_size,
1701+ (void *)
1702+ args[i]);
1703+#endif
1704+ commmand_buffer_offset += arg_size;
1705+ break;
1706+ }
1707+
1708+ CASE_OUT_POINTERS:
1709+ {
1710+ fprintf(stderr,
1711+ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
1712+ tab_opengl_calls_name[func_number], i, pid);
1713+ disconnect_current();
1714+ return 0;
1715+ }
1716+
1717+ case TYPE_DOUBLE:
1718+ CASE_IN_KNOWN_SIZE_POINTERS:
1719+ args[i] =
1720+ (long) (command_buffer + commmand_buffer_offset);
1721+#ifdef ENABLE_GL_LOG
1722+ if (is_logging(pid))
1723+ write_gl_debug_cmd_buffer_without_size(
1724+ tab_args_type_length[args_type[i]],
1725+ (void *) args[i]);
1726+#endif
1727+ commmand_buffer_offset +=
1728+ tab_args_type_length[args_type[i]];
1729+ break;
1730+
1731+ case TYPE_IN_IGNORED_POINTER:
1732+ args[i] = 0;
1733+ break;
1734+
1735+ default:
1736+ fprintf(stderr,
1737+ "shouldn't happen : call %s arg %d pid=%d\n",
1738+ tab_opengl_calls_name[func_number], i, pid);
1739+ disconnect_current();
1740+ return 0;
1741+ }
1742+ }
1743+ do_function_call(func_number, args, ret_string);
1744+ }
1745+
1746+ ret = 0;
1747+ } else {
1748+#ifdef ENABLE_GL_LOG
1749+ if (is_logging(pid))
1750+ write_gl_debug_cmd_short(func_number);
1751+#endif
1752+
1753+ for (i = 0; i < nb_args; i++) {
1754+ switch (args_type[i]) {
1755+ case TYPE_UNSIGNED_INT:
1756+ case TYPE_INT:
1757+ case TYPE_UNSIGNED_CHAR:
1758+ case TYPE_CHAR:
1759+ case TYPE_UNSIGNED_SHORT:
1760+ case TYPE_SHORT:
1761+ case TYPE_FLOAT:
1762+#ifdef ENABLE_GL_LOG
1763+ if (is_logging(pid))
1764+ write_gl_debug_cmd_int(args[i]);
1765+#endif
1766+ break;
1767+
1768+ case TYPE_NULL_TERMINATED_STRING:
1769+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1770+ if (args[i] == 0 && args_size[i] == 0) {
1771+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1772+ fprintf(stderr, "call %s arg %d pid=%d\n",
1773+ tab_opengl_calls_name[func_number], i, pid);
1774+ disconnect_current();
1775+ return 0;
1776+ }
1777+ } else if (args[i] == 0 && args_size[i] != 0) {
1778+ fprintf(stderr, "call %s arg %d pid=%d\n",
1779+ tab_opengl_calls_name[func_number], i, pid);
1780+ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
1781+ disconnect_current();
1782+ return 0;
1783+ } else if (args[i] != 0 && args_size[i] == 0) {
1784+ fprintf(stderr, "call %s arg %d pid=%d\n",
1785+ tab_opengl_calls_name[func_number], i, pid);
1786+ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
1787+ disconnect_current();
1788+ return 0;
1789+ }
1790+ if (args[i]) {
1791+ args[i] =
1792+ (arg_t) get_host_read_pointer(env, args[i],
1793+ args_size[i]);
1794+ if (args[i] == 0) {
1795+ fprintf(stderr, "call %s arg %d pid=%d\n",
1796+ tab_opengl_calls_name[func_number], i, pid);
1797+ fprintf(stderr, "can not get %d bytes\n",
1798+ args_size[i]);
1799+ disconnect_current();
1800+ return 0;
1801+ }
1802+ }
1803+#ifdef ENABLE_GL_LOG
1804+ if (is_logging(pid))
1805+ write_gl_debug_cmd_buffer_with_size(args_size[i],
1806+ (void *) args[i]);
1807+#endif
1808+ break;
1809+
1810+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1811+ {
1812+ args_size[i] =
1813+ compute_arg_length(stderr, func_number, i, args);
1814+ args[i] = (args_size[i]) ? (arg_t)
1815+ get_host_read_pointer(env,
1816+ args[i], args_size [i]) : 0;
1817+ if (args[i] == 0 && args_size[i] != 0) {
1818+ fprintf(stderr, "call %s arg %d pid=%d\n",
1819+ tab_opengl_calls_name[func_number], i, pid);
1820+ fprintf(stderr, "can not get %d bytes\n",
1821+ args_size[i]);
1822+ disconnect_current();
1823+ return 0;
1824+ }
1825+#ifdef ENABLE_GL_LOG
1826+ if (is_logging(pid))
1827+ write_gl_debug_cmd_buffer_without_size(args_size[i],
1828+ (void *) args[i]);
1829+#endif
1830+ break;
1831+ }
1832+
1833+ CASE_OUT_POINTERS:
1834+ {
1835+ int mem_state;
1836+
1837+#ifdef ENABLE_GL_LOG
1838+ if (is_logging(pid))
1839+ switch (args_type[i]) {
1840+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
1841+ write_gl_debug_cmd_int(args_size[i]);
1842+ break;
1843+
1844+ default:
1845+ break;
1846+ }
1847+#endif
1848+
1849+ if (func_number == glXQueryExtension_func && args[i] == 0) {
1850+ saved_out_ptr[i] = 0;
1851+ continue;
1852+ }
1853+ if (args[i] == 0 && args_size[i] == 0) {
1854+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1855+ fprintf(stderr, "call %s arg %d pid=%d\n",
1856+ tab_opengl_calls_name[func_number], i,
1857+ pid);
1858+ disconnect_current();
1859+ return 0;
1860+ }
1861+ fprintf(stderr, "call %s arg %d pid=%d\n",
1862+ tab_opengl_calls_name[func_number], i, pid);
1863+ disconnect_current();
1864+ return 0;
1865+ } else if (args[i] == 0 && args_size[i] != 0) {
1866+ fprintf(stderr, "call %s arg %d pid=%d\n",
1867+ tab_opengl_calls_name[func_number], i, pid);
1868+ fprintf(stderr,
1869+ "args[i] == 0 && args_size[i] != 0 !!\n");
1870+ disconnect_current();
1871+ return 0;
1872+ } else if (args[i] != 0 && args_size[i] == 0) {
1873+ fprintf(stderr, "call %s arg %d pid=%d\n",
1874+ tab_opengl_calls_name[func_number], i, pid);
1875+ fprintf(stderr,
1876+ "args[i] != 0 && args_size[i] == 0 !!\n");
1877+ disconnect_current();
1878+ return 0;
1879+ }
1880+ if (args[i]) {
1881+ mem_state =
1882+ get_target_mem_state(env, args[i], args_size[i]);
1883+ if (mem_state == NOT_MAPPED) {
1884+ fprintf(stderr,
1885+ "call %s arg %d pid=%d addr="
1886+ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
1887+ tab_opengl_calls_name[func_number], i,
1888+ pid, args[i], args_size[i]);
1889+ disconnect_current();
1890+ return 0;
1891+ } else if (mem_state == MAPPED_CONTIGUOUS) {
1892+ saved_out_ptr[i] = 0;
1893+ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
1894+ } else {
1895+ saved_out_ptr[i] = args[i];
1896+ args[i] = (arg_t) malloc(args_size[i]);
1897+ }
1898+ } else {
1899+ saved_out_ptr[i] = 0;
1900+ }
1901+ break;
1902+ }
1903+
1904+ case TYPE_DOUBLE:
1905+ CASE_IN_KNOWN_SIZE_POINTERS:
1906+ if (args[i] == 0) {
1907+ fprintf(stderr, "call %s arg %d pid=%d\n",
1908+ tab_opengl_calls_name[func_number], i, pid);
1909+ fprintf(stderr, "can not get %d bytes\n",
1910+ tab_args_type_length[args_type[i]]);
1911+ disconnect_current();
1912+ return 0;
1913+ }
1914+ args[i] = (arg_t) get_host_read_pointer(env,
1915+ args[i], tab_args_type_length[args_type[i]]);
1916+ if (args[i] == 0) {
1917+ fprintf(stderr, "call %s arg %d pid=%d\n",
1918+ tab_opengl_calls_name[func_number], i, pid);
1919+ fprintf(stderr, "can not get %d bytes\n",
1920+ tab_args_type_length[args_type[i]]);
1921+ disconnect_current();
1922+ return 0;
1923+ }
1924+#ifdef ENABLE_GL_LOG
1925+ if (is_logging(pid))
1926+ write_gl_debug_cmd_buffer_without_size
1927+ (tab_args_type_length[args_type[i]],
1928+ (void *) args[i]);
1929+#endif
1930+ break;
1931+
1932+ case TYPE_IN_IGNORED_POINTER:
1933+ args[i] = 0;
1934+ break;
1935+
1936+ default:
1937+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
1938+ tab_opengl_calls_name[func_number], i, pid);
1939+ disconnect_current();
1940+ return 0;
1941+ }
1942+ }
1943+
1944+ if (ret_type == TYPE_CONST_CHAR) {
1945+ ret_string[0] = 0;
1946+ }
1947+
1948+ if (func_number == _init32_func || func_number == _init64_func) {
1949+ if (func_number == _init32_func) {
1950+ if (wordsize != 32) {
1951+ fprintf(stderr,
1952+ "clients with different ABIs not supported\n");
1953+ exit(-1);
1954+ }
1955+ } else {
1956+ if (wordsize != 64) {
1957+ fprintf(stderr,
1958+ "clients with different ABIs not supported\n");
1959+ exit(-1);
1960+ }
1961+ }
1962+
1963+ if (must_save && args[0])
1964+ fprintf(stderr, "error: pid %i is already recording\n",
1965+ logger_pid);
1966+ else if (args[0]) {
1967+ logger_pid = pid;
1968+ must_save = 1;
1969+ }
1970+#ifdef USE_KQEMU
1971+ if (env->kqemu_enabled)
1972+ *(int *) args[1] = 2;
1973+ else
1974+#endif
1975+ *(int *) args[1] = 1;
1976+ ret = 0;
1977+ } else {
1978+ ret = do_function_call(func_number, args, ret_string);
1979+ }
1980+#ifdef ENABLE_GL_LOG
1981+ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
1982+ write_gl_debug_cmd_int(ret);
1983+#endif
1984+ for (i = 0; i < nb_args; i++) {
1985+ switch (args_type[i]) {
1986+ CASE_OUT_POINTERS:
1987+ {
1988+ if (saved_out_ptr[i]) {
1989+ if (memcpy_host_to_target(env, saved_out_ptr[i],
1990+ (void *) args[i],
1991+ args_size[i]) == 0) {
1992+ fprintf(stderr, "could not copy out parameters "
1993+ "back to user space\n");
1994+ disconnect_current();
1995+ return 0;
1996+ }
1997+ free((void *) args[i]);
1998+ }
1999+ break;
2000+ }
2001+
2002+ default:
2003+ break;
2004+ }
2005+ }
2006+
2007+ if (ret_type == TYPE_CONST_CHAR)
2008+ if (target_ret_string) {
2009+ /* the my_strlen stuff is a hack to workaround a GCC bug if
2010+ * using directly strlen... */
2011+ if (memcpy_host_to_target(env, target_ret_string, ret_string,
2012+ my_strlen(ret_string) + 1) == 0) {
2013+ fprintf(stderr, "cannot copy out parameters "
2014+ "back to user space\n");
2015+ disconnect_current();
2016+ return 0;
2017+ }
2018+ }
2019+ }
2020+
2021+#ifdef ENABLE_GL_LOG
2022+ if (is_logging(pid) && func_number == _exit_process_func) {
2023+ write_gl_debug_end();
2024+ }
2025+#endif
2026+
2027+ return ret;
2028+}
2029+
2030+static int decode_call(CPUState *env, int func_number, int pid,
2031+ target_ulong target_ret_string, target_ulong in_args,
2032+ target_ulong in_args_size)
2033+{
2034+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
2035+ fprintf(stderr,
2036+ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
2037+ return 0;
2038+ }
2039+
2040+ return decode_call_int(env, func_number, pid,
2041+ target_ret_string, in_args, in_args_size);
2042+}
2043+
2044+void helper_opengl(void)
2045+{
2046+ doing_opengl = 1;
2047+ env->regs[R_EAX] =
2048+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
2049+ env->regs[R_EDX], env->regs[R_ESI]);
2050+ doing_opengl = 0;
2051+}
2052+
2053+void mem_opengl(uint64_t ptr)
2054+{
2055+ uint64_t *params = get_phys_mem_addr(env, ptr);
2056+ int ret;
2057+
2058+ /* Execute */
2059+ doing_opengl = 1;
2060+ ret = decode_call(env, le64_to_cpu(params[0]),
2061+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
2062+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
2063+ doing_opengl = 0;
2064+
2065+ params[0] = cpu_to_le64(ret);
2066+ params[5] = 0;
2067+}
2068+
2069+#define THREADINFO_TASK_OFFSET 0x0 //// 0x0
2070+#define THREADSTRUCT_IOPL_OFFSET 0x78 //// 0x80
2071+#define TASKSTRUCT_NEXT_OFFSET 0x1a0 //// 0x1e8
2072+#define TASKSTRUCT_PREV_OFFSET 0x1a4 //// 0x1ec
2073+#define TASKSTRUCT_RCRED_OFFSET 0x29c //// 0x2b4
2074+#define TASKSTRUCT_CRED_OFFSET 0x2a0 //// 0x2b8
2075+#define TASKSTRUCT_COMM_OFFSET 0x2c0 //// 0x2fc
2076+#define TASKSTRUCT_THREAD_OFFSET 0x2e4 //// 0x318
2077+#define TASKSTRUCT_IO_CTX_OFFSET 0x40c //// 0x428
2078+#define CRED_CAPINH_OFFSET 0x28
2079+#define CRED_CAPPER_OFFSET 0x30
2080+#define CRED_CAPEFF_OFFSET 0x38
2081+#define CRED_CAPBST_OFFSET 0x40
2082+/* How to obtain the numbers:
2083+ * $ gbd vmlinux
2084+ * ...
2085+ * (gdb) print &((struct task_struct *) 0)->real_cred
2086+ * $22 = (const struct cred **) 0x29c
2087+ * (gdb) print &((struct task_struct *) 0)->cred
2088+ * $23 = (const struct cred **) 0x2a0
2089+ * (gbd) ...
2090+ * ...
2091+ * (gdb) ^D
2092+ * $ vim target-i386/helper_opengl.c
2093+ * ...
2094+ * :wq
2095+ * $ make
2096+ * ...
2097+ *
2098+ * Testing:
2099+ * $ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2100+ * ^Z
2101+ * [1]+ Stopped x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2102+ * $ bg
2103+ * [1]+ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2104+ * $ gdb
2105+ * ...
2106+ * (gdb) target remote localhost:1234
2107+ * ...
2108+ * (gdb) print ((char *) *(unsigned int *) ((unsigned int) $rsp & ~8191)) +
2109+ * 0x2c0
2110+ * $9 = 0xc094062c "swapper"
2111+ * (gdb) print (char *) (*(unsigned int *) (((char *) *(unsigned int *)
2112+ * ((unsigned int) $rsp & ~8191)) + 0x1a0) - 0x1a0) + 0x2c0
2113+ * $10 = 0xdf87cee0 "init"
2114+ * ...
2115+ */
2116+
2117+#define CAP_SYS_RAWIO 17
2118+
2119+#define THREAD_SIZE (TARGET_PAGE_SIZE << 1)
2120+static ram_addr_t x86_current_thread(void)
2121+{
2122+ return env->regs[R_ESP] & ~(THREAD_SIZE - 1);
2123+}
2124+
2125+static ram_addr_t x86_current_task(void)
2126+{
2127+ return *(uint32_t *) get_phys_mem_addr(env,
2128+ x86_current_thread() + THREADINFO_TASK_OFFSET);
2129+}
2130+
2131+static ram_addr_t x86_current_io_ctx(void)
2132+{
2133+ return *(uint32_t *) get_phys_mem_addr(env,
2134+ x86_current_task() + TASKSTRUCT_IO_CTX_OFFSET);
2135+}
2136+
2137+static ram_addr_t x86_task_name(ram_addr_t proc)
2138+{
2139+ return x86_current_task() + TASKSTRUCT_COMM_OFFSET;
2140+}
2141+
2142+static ram_addr_t x86_task_next(ram_addr_t proc)
2143+{
2144+ return *(uint32_t *) get_phys_mem_addr(env,
2145+ x86_current_task() + TASKSTRUCT_NEXT_OFFSET) -
2146+ TASKSTRUCT_NEXT_OFFSET;
2147+}
2148+
2149+static void x86_cap_set(ram_addr_t caps, int cap)
2150+{
2151+ int offset = cap >> 5;
2152+ int mask = 1 << (cap & 31);
2153+
2154+ *(uint32_t *) get_phys_mem_addr(env, caps + offset) |= mask;
2155+}
2156+
2157+static void x86_cred_cap_set(ram_addr_t creds, int cap)
2158+{
2159+ x86_cap_set(creds + CRED_CAPINH_OFFSET, cap);
2160+ x86_cap_set(creds + CRED_CAPPER_OFFSET, cap);
2161+ x86_cap_set(creds + CRED_CAPEFF_OFFSET, cap);
2162+ x86_cap_set(creds + CRED_CAPBST_OFFSET, cap);
2163+}
2164+
2165+static void x86_task_cap_set(ram_addr_t proc, int cap)
2166+{
2167+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
2168+ proc + TASKSTRUCT_RCRED_OFFSET), cap);
2169+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
2170+ proc + TASKSTRUCT_CRED_OFFSET), cap);
2171+}
2172+
2173+#include "kvm.h"
2174+
2175+/* The putting and getting of the register set seems to incure a too
2176+ * high overhead. It's at least 4 ioctl's each. */
2177+#if 0
2178+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2179+{
2180+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2181+ if (val == (uint8_t) -1)
2182+ return;
2183+
2184+ if (kvm_enabled())
2185+ kvm_arch_get_registers(env);
2186+ doing_opengl = 1;
2187+ env->regs[R_EAX] =
2188+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
2189+ env->regs[R_ESI], env->regs[R_EDI]);
2190+ doing_opengl = 0;
2191+ if (kvm_enabled())
2192+ kvm_arch_put_registers(env);
2193+}
2194+#else
2195+static void get_regs(void)
2196+{
2197+ /* We only really need the eflags and cr[0..4] */
2198+ if (kvm_enabled())
2199+ kvm_get_sregs(env);
2200+}
2201+
2202+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2203+{
2204+ uint64_t *params;
2205+ int ret;
2206+
2207+ /* Only need to fetch the registers after a guest's context switch...
2208+ * the problem is, to find out about context switches we already need
2209+ * to fetch rsp
2210+ * TODO: pass the pid in val. the params pointer doesn't need to be
2211+ * passed on all calls because it can be a global and be constant.
2212+ */
2213+ get_regs();
2214+
2215+ params = get_phys_mem_addr(env, (target_ulong) val);
2216+
2217+ /* Execute */
2218+ doing_opengl = 1;
2219+ ret = decode_call(env, le64_to_cpu(params[0]),
2220+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
2221+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
2222+ doing_opengl = 0;
2223+
2224+ params[0] = cpu_to_le64(ret);
2225+ params[5] = 0;
2226+}
2227+#endif
2228+
2229+static void opengl_ioport_write_first(void *data, uint32_t addr, uint32_t val)
2230+{
2231+ if (val != (uint32_t) -1)
2232+ return;
2233+
2234+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2235+
2236+ register_ioport_write(9996, 4, 4, opengl_ioport_write, (void *) 1);
2237+}
2238+
2239+void io_register(void)
2240+{
2241+ register_ioport_write(9996, 4, 4, opengl_ioport_write_first, (void *) 1);
2242+}
2243+
2244+void opengl_process_enable(void)
2245+{
2246+ ram_addr_t task;
2247+ char *name;
2248+ int newlevel = 3;
2249+ uint32_t iopl = newlevel << 12;
2250+ void *ioplptr;
2251+
2252+ if (kvm_enabled())
2253+ kvm_arch_get_registers(env);
2254+ allow_kernel = 1;
2255+
2256+ task = x86_current_task();
2257+ x86_task_cap_set(task, CAP_SYS_RAWIO);
2258+ name = get_phys_mem_addr(env, x86_task_name(task));
2259+
2260+ ioplptr = get_phys_mem_addr(env, task +
2261+ TASKSTRUCT_THREAD_OFFSET + THREADSTRUCT_IOPL_OFFSET);
2262+ ((uint32_t *) ioplptr)[0] = cpu_to_le32(iopl);
2263+
2264+ env->eflags &= ~0x3000;
2265+ env->eflags |= newlevel << 12;
2266+
2267+ allow_kernel = 0;
2268+ if (kvm_enabled())
2269+ kvm_arch_put_registers(env);
2270+
2271+ printf("Granted OpenGL access to process '%s'\n", name);
2272+
2273+ io_register();
2274+}
2275+#endif
2276diff --git a/target-i386/kvm.c b/target-i386/kvm.c
2277index eb61598..5c6fbae 100644
2278--- a/target-i386/kvm.c
2279+++ b/target-i386/kvm.c
2280@@ -480,7 +480,7 @@ static int kvm_get_fpu(CPUState *env)
2281 return 0;
2282 }
2283
2284-static int kvm_get_sregs(CPUState *env)
2285+int kvm_get_sregs(CPUState *env)
2286 {
2287 struct kvm_sregs sregs;
2288 uint32_t hflags;
2289diff --git a/target-i386/mesa_enums.c b/target-i386/mesa_enums.c
2290new file mode 100644
2291index 0000000..61a540c
2292--- /dev/null
2293+++ b/target-i386/mesa_enums.c
2294@@ -0,0 +1,4890 @@
2295+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
2296+
2297+/*
2298+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
2299+ * All Rights Reserved.
2300+ *
2301+ * Permission is hereby granted, free of charge, to any person obtaining a
2302+ * copy of this software and associated documentation files (the "Software"),
2303+ * to deal in the Software without restriction, including without limitation
2304+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
2305+ * and/or sell copies of the Software, and to permit persons to whom the
2306+ * Software is furnished to do so, subject to the following conditions:
2307+ *
2308+ * The above copyright notice and this permission notice (including the next
2309+ * paragraph) shall be included in all copies or substantial portions of the
2310+ * Software.
2311+ *
2312+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2313+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2314+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
2315+ * BRIAN PAUL,
2316+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2317+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
2318+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2319+ * SOFTWARE.
2320+ */
2321+
2322+#include "glheader.h"
2323+#include "enums.h"
2324+#include "imports.h"
2325+
2326+typedef struct {
2327+ size_t offset;
2328+ int n;
2329+} enum_elt;
2330+
2331+LONGSTRING static const char enum_string_table[] =
2332+ "GL_2D\0"
2333+ "GL_2_BYTES\0"
2334+ "GL_3D\0"
2335+ "GL_3D_COLOR\0"
2336+ "GL_3D_COLOR_TEXTURE\0"
2337+ "GL_3_BYTES\0"
2338+ "GL_4D_COLOR_TEXTURE\0"
2339+ "GL_4_BYTES\0"
2340+ "GL_ACCUM\0"
2341+ "GL_ACCUM_ALPHA_BITS\0"
2342+ "GL_ACCUM_BLUE_BITS\0"
2343+ "GL_ACCUM_BUFFER_BIT\0"
2344+ "GL_ACCUM_CLEAR_VALUE\0"
2345+ "GL_ACCUM_GREEN_BITS\0"
2346+ "GL_ACCUM_RED_BITS\0"
2347+ "GL_ACTIVE_ATTRIBUTES\0"
2348+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
2349+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
2350+ "GL_ACTIVE_TEXTURE\0"
2351+ "GL_ACTIVE_TEXTURE_ARB\0"
2352+ "GL_ACTIVE_UNIFORMS\0"
2353+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
2354+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
2355+ "GL_ADD\0"
2356+ "GL_ADD_SIGNED\0"
2357+ "GL_ADD_SIGNED_ARB\0"
2358+ "GL_ADD_SIGNED_EXT\0"
2359+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
2360+ "GL_ALIASED_POINT_SIZE_RANGE\0"
2361+ "GL_ALL_ATTRIB_BITS\0"
2362+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
2363+ "GL_ALPHA\0"
2364+ "GL_ALPHA12\0"
2365+ "GL_ALPHA12_EXT\0"
2366+ "GL_ALPHA16\0"
2367+ "GL_ALPHA16_EXT\0"
2368+ "GL_ALPHA4\0"
2369+ "GL_ALPHA4_EXT\0"
2370+ "GL_ALPHA8\0"
2371+ "GL_ALPHA8_EXT\0"
2372+ "GL_ALPHA_BIAS\0"
2373+ "GL_ALPHA_BITS\0"
2374+ "GL_ALPHA_SCALE\0"
2375+ "GL_ALPHA_TEST\0"
2376+ "GL_ALPHA_TEST_FUNC\0"
2377+ "GL_ALPHA_TEST_REF\0"
2378+ "GL_ALWAYS\0"
2379+ "GL_AMBIENT\0"
2380+ "GL_AMBIENT_AND_DIFFUSE\0"
2381+ "GL_AND\0"
2382+ "GL_AND_INVERTED\0"
2383+ "GL_AND_REVERSE\0"
2384+ "GL_ARRAY_BUFFER\0"
2385+ "GL_ARRAY_BUFFER_ARB\0"
2386+ "GL_ARRAY_BUFFER_BINDING\0"
2387+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
2388+ "GL_ATTACHED_SHADERS\0"
2389+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
2390+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
2391+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
2392+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
2393+ "GL_ATTRIB_STACK_DEPTH\0"
2394+ "GL_AUTO_NORMAL\0"
2395+ "GL_AUX0\0"
2396+ "GL_AUX1\0"
2397+ "GL_AUX2\0"
2398+ "GL_AUX3\0"
2399+ "GL_AUX_BUFFERS\0"
2400+ "GL_BACK\0"
2401+ "GL_BACK_LEFT\0"
2402+ "GL_BACK_RIGHT\0"
2403+ "GL_BGR\0"
2404+ "GL_BGRA\0"
2405+ "GL_BITMAP\0"
2406+ "GL_BITMAP_TOKEN\0"
2407+ "GL_BLEND\0"
2408+ "GL_BLEND_COLOR\0"
2409+ "GL_BLEND_COLOR_EXT\0"
2410+ "GL_BLEND_DST\0"
2411+ "GL_BLEND_DST_ALPHA\0"
2412+ "GL_BLEND_DST_RGB\0"
2413+ "GL_BLEND_EQUATION\0"
2414+ "GL_BLEND_EQUATION_ALPHA\0"
2415+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
2416+ "GL_BLEND_EQUATION_EXT\0"
2417+ "GL_BLEND_EQUATION_RGB_EXT\0"
2418+ "GL_BLEND_SRC\0"
2419+ "GL_BLEND_SRC_ALPHA\0"
2420+ "GL_BLEND_SRC_RGB\0"
2421+ "GL_BLUE\0"
2422+ "GL_BLUE_BIAS\0"
2423+ "GL_BLUE_BITS\0"
2424+ "GL_BLUE_SCALE\0"
2425+ "GL_BOOL\0"
2426+ "GL_BOOL_ARB\0"
2427+ "GL_BOOL_VEC2\0"
2428+ "GL_BOOL_VEC2_ARB\0"
2429+ "GL_BOOL_VEC3\0"
2430+ "GL_BOOL_VEC3_ARB\0"
2431+ "GL_BOOL_VEC4\0"
2432+ "GL_BOOL_VEC4_ARB\0"
2433+ "GL_BUFFER_ACCESS\0"
2434+ "GL_BUFFER_ACCESS_ARB\0"
2435+ "GL_BUFFER_MAPPED\0"
2436+ "GL_BUFFER_MAPPED_ARB\0"
2437+ "GL_BUFFER_MAP_POINTER\0"
2438+ "GL_BUFFER_MAP_POINTER_ARB\0"
2439+ "GL_BUFFER_SIZE\0"
2440+ "GL_BUFFER_SIZE_ARB\0"
2441+ "GL_BUFFER_USAGE\0"
2442+ "GL_BUFFER_USAGE_ARB\0"
2443+ "GL_BYTE\0"
2444+ "GL_C3F_V3F\0"
2445+ "GL_C4F_N3F_V3F\0"
2446+ "GL_C4UB_V2F\0"
2447+ "GL_C4UB_V3F\0"
2448+ "GL_CCW\0"
2449+ "GL_CLAMP\0"
2450+ "GL_CLAMP_TO_BORDER\0"
2451+ "GL_CLAMP_TO_BORDER_ARB\0"
2452+ "GL_CLAMP_TO_BORDER_SGIS\0"
2453+ "GL_CLAMP_TO_EDGE\0"
2454+ "GL_CLAMP_TO_EDGE_SGIS\0"
2455+ "GL_CLEAR\0"
2456+ "GL_CLIENT_ACTIVE_TEXTURE\0"
2457+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
2458+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
2459+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
2460+ "GL_CLIENT_PIXEL_STORE_BIT\0"
2461+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
2462+ "GL_CLIP_PLANE0\0"
2463+ "GL_CLIP_PLANE1\0"
2464+ "GL_CLIP_PLANE2\0"
2465+ "GL_CLIP_PLANE3\0"
2466+ "GL_CLIP_PLANE4\0"
2467+ "GL_CLIP_PLANE5\0"
2468+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
2469+ "GL_COEFF\0"
2470+ "GL_COLOR\0"
2471+ "GL_COLOR_ARRAY\0"
2472+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
2473+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
2474+ "GL_COLOR_ARRAY_POINTER\0"
2475+ "GL_COLOR_ARRAY_SIZE\0"
2476+ "GL_COLOR_ARRAY_STRIDE\0"
2477+ "GL_COLOR_ARRAY_TYPE\0"
2478+ "GL_COLOR_ATTACHMENT0_EXT\0"
2479+ "GL_COLOR_ATTACHMENT10_EXT\0"
2480+ "GL_COLOR_ATTACHMENT11_EXT\0"
2481+ "GL_COLOR_ATTACHMENT12_EXT\0"
2482+ "GL_COLOR_ATTACHMENT13_EXT\0"
2483+ "GL_COLOR_ATTACHMENT14_EXT\0"
2484+ "GL_COLOR_ATTACHMENT15_EXT\0"
2485+ "GL_COLOR_ATTACHMENT1_EXT\0"
2486+ "GL_COLOR_ATTACHMENT2_EXT\0"
2487+ "GL_COLOR_ATTACHMENT3_EXT\0"
2488+ "GL_COLOR_ATTACHMENT4_EXT\0"
2489+ "GL_COLOR_ATTACHMENT5_EXT\0"
2490+ "GL_COLOR_ATTACHMENT6_EXT\0"
2491+ "GL_COLOR_ATTACHMENT7_EXT\0"
2492+ "GL_COLOR_ATTACHMENT8_EXT\0"
2493+ "GL_COLOR_ATTACHMENT9_EXT\0"
2494+ "GL_COLOR_BUFFER_BIT\0"
2495+ "GL_COLOR_CLEAR_VALUE\0"
2496+ "GL_COLOR_INDEX\0"
2497+ "GL_COLOR_INDEXES\0"
2498+ "GL_COLOR_LOGIC_OP\0"
2499+ "GL_COLOR_MATERIAL\0"
2500+ "GL_COLOR_MATERIAL_FACE\0"
2501+ "GL_COLOR_MATERIAL_PARAMETER\0"
2502+ "GL_COLOR_MATRIX\0"
2503+ "GL_COLOR_MATRIX_SGI\0"
2504+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
2505+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2506+ "GL_COLOR_SUM\0"
2507+ "GL_COLOR_SUM_ARB\0"
2508+ "GL_COLOR_TABLE\0"
2509+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
2510+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
2511+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
2512+ "GL_COLOR_TABLE_BIAS\0"
2513+ "GL_COLOR_TABLE_BIAS_SGI\0"
2514+ "GL_COLOR_TABLE_BLUE_SIZE\0"
2515+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
2516+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
2517+ "GL_COLOR_TABLE_FORMAT\0"
2518+ "GL_COLOR_TABLE_FORMAT_EXT\0"
2519+ "GL_COLOR_TABLE_FORMAT_SGI\0"
2520+ "GL_COLOR_TABLE_GREEN_SIZE\0"
2521+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
2522+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
2523+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
2524+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
2525+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
2526+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
2527+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
2528+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
2529+ "GL_COLOR_TABLE_RED_SIZE\0"
2530+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
2531+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
2532+ "GL_COLOR_TABLE_SCALE\0"
2533+ "GL_COLOR_TABLE_SCALE_SGI\0"
2534+ "GL_COLOR_TABLE_WIDTH\0"
2535+ "GL_COLOR_TABLE_WIDTH_EXT\0"
2536+ "GL_COLOR_TABLE_WIDTH_SGI\0"
2537+ "GL_COLOR_WRITEMASK\0"
2538+ "GL_COMBINE\0"
2539+ "GL_COMBINE4\0"
2540+ "GL_COMBINE_ALPHA\0"
2541+ "GL_COMBINE_ALPHA_ARB\0"
2542+ "GL_COMBINE_ALPHA_EXT\0"
2543+ "GL_COMBINE_ARB\0"
2544+ "GL_COMBINE_EXT\0"
2545+ "GL_COMBINE_RGB\0"
2546+ "GL_COMBINE_RGB_ARB\0"
2547+ "GL_COMBINE_RGB_EXT\0"
2548+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
2549+ "GL_COMPARE_R_TO_TEXTURE\0"
2550+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
2551+ "GL_COMPILE\0"
2552+ "GL_COMPILE_AND_EXECUTE\0"
2553+ "GL_COMPILE_STATUS\0"
2554+ "GL_COMPRESSED_ALPHA\0"
2555+ "GL_COMPRESSED_ALPHA_ARB\0"
2556+ "GL_COMPRESSED_INTENSITY\0"
2557+ "GL_COMPRESSED_INTENSITY_ARB\0"
2558+ "GL_COMPRESSED_LUMINANCE\0"
2559+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
2560+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
2561+ "GL_COMPRESSED_LUMINANCE_ARB\0"
2562+ "GL_COMPRESSED_RGB\0"
2563+ "GL_COMPRESSED_RGBA\0"
2564+ "GL_COMPRESSED_RGBA_ARB\0"
2565+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
2566+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
2567+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
2568+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
2569+ "GL_COMPRESSED_RGB_ARB\0"
2570+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
2571+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
2572+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
2573+ "GL_CONSTANT\0"
2574+ "GL_CONSTANT_ALPHA\0"
2575+ "GL_CONSTANT_ALPHA_EXT\0"
2576+ "GL_CONSTANT_ARB\0"
2577+ "GL_CONSTANT_ATTENUATION\0"
2578+ "GL_CONSTANT_BORDER_HP\0"
2579+ "GL_CONSTANT_COLOR\0"
2580+ "GL_CONSTANT_COLOR_EXT\0"
2581+ "GL_CONSTANT_EXT\0"
2582+ "GL_CONVOLUTION_1D\0"
2583+ "GL_CONVOLUTION_2D\0"
2584+ "GL_CONVOLUTION_BORDER_COLOR\0"
2585+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
2586+ "GL_CONVOLUTION_BORDER_MODE\0"
2587+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
2588+ "GL_CONVOLUTION_FILTER_BIAS\0"
2589+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
2590+ "GL_CONVOLUTION_FILTER_SCALE\0"
2591+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
2592+ "GL_CONVOLUTION_FORMAT\0"
2593+ "GL_CONVOLUTION_FORMAT_EXT\0"
2594+ "GL_CONVOLUTION_HEIGHT\0"
2595+ "GL_CONVOLUTION_HEIGHT_EXT\0"
2596+ "GL_CONVOLUTION_WIDTH\0"
2597+ "GL_CONVOLUTION_WIDTH_EXT\0"
2598+ "GL_COORD_REPLACE\0"
2599+ "GL_COORD_REPLACE_ARB\0"
2600+ "GL_COORD_REPLACE_NV\0"
2601+ "GL_COPY\0"
2602+ "GL_COPY_INVERTED\0"
2603+ "GL_COPY_PIXEL_TOKEN\0"
2604+ "GL_CULL_FACE\0"
2605+ "GL_CULL_FACE_MODE\0"
2606+ "GL_CULL_VERTEX_EXT\0"
2607+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
2608+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
2609+ "GL_CURRENT_ATTRIB_NV\0"
2610+ "GL_CURRENT_BIT\0"
2611+ "GL_CURRENT_COLOR\0"
2612+ "GL_CURRENT_FOG_COORD\0"
2613+ "GL_CURRENT_FOG_COORDINATE\0"
2614+ "GL_CURRENT_INDEX\0"
2615+ "GL_CURRENT_MATRIX_ARB\0"
2616+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
2617+ "GL_CURRENT_MATRIX_NV\0"
2618+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
2619+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
2620+ "GL_CURRENT_NORMAL\0"
2621+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
2622+ "GL_CURRENT_PROGRAM\0"
2623+ "GL_CURRENT_QUERY\0"
2624+ "GL_CURRENT_QUERY_ARB\0"
2625+ "GL_CURRENT_RASTER_COLOR\0"
2626+ "GL_CURRENT_RASTER_DISTANCE\0"
2627+ "GL_CURRENT_RASTER_INDEX\0"
2628+ "GL_CURRENT_RASTER_POSITION\0"
2629+ "GL_CURRENT_RASTER_POSITION_VALID\0"
2630+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
2631+ "GL_CURRENT_SECONDARY_COLOR\0"
2632+ "GL_CURRENT_TEXTURE_COORDS\0"
2633+ "GL_CURRENT_VERTEX_ATTRIB\0"
2634+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
2635+ "GL_CURRENT_WEIGHT_ARB\0"
2636+ "GL_CW\0"
2637+ "GL_DEBUG_ASSERT_MESA\0"
2638+ "GL_DEBUG_OBJECT_MESA\0"
2639+ "GL_DEBUG_PRINT_MESA\0"
2640+ "GL_DECAL\0"
2641+ "GL_DECR\0"
2642+ "GL_DECR_WRAP\0"
2643+ "GL_DECR_WRAP_EXT\0"
2644+ "GL_DELETE_STATUS\0"
2645+ "GL_DEPTH\0"
2646+ "GL_DEPTH_ATTACHMENT_EXT\0"
2647+ "GL_DEPTH_BIAS\0"
2648+ "GL_DEPTH_BITS\0"
2649+ "GL_DEPTH_BOUNDS_EXT\0"
2650+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
2651+ "GL_DEPTH_BUFFER_BIT\0"
2652+ "GL_DEPTH_CLAMP_NV\0"
2653+ "GL_DEPTH_CLEAR_VALUE\0"
2654+ "GL_DEPTH_COMPONENT\0"
2655+ "GL_DEPTH_COMPONENT16\0"
2656+ "GL_DEPTH_COMPONENT16_ARB\0"
2657+ "GL_DEPTH_COMPONENT16_SGIX\0"
2658+ "GL_DEPTH_COMPONENT24\0"
2659+ "GL_DEPTH_COMPONENT24_ARB\0"
2660+ "GL_DEPTH_COMPONENT24_SGIX\0"
2661+ "GL_DEPTH_COMPONENT32\0"
2662+ "GL_DEPTH_COMPONENT32_ARB\0"
2663+ "GL_DEPTH_COMPONENT32_SGIX\0"
2664+ "GL_DEPTH_FUNC\0"
2665+ "GL_DEPTH_RANGE\0"
2666+ "GL_DEPTH_SCALE\0"
2667+ "GL_DEPTH_STENCIL_NV\0"
2668+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
2669+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
2670+ "GL_DEPTH_TEST\0"
2671+ "GL_DEPTH_TEXTURE_MODE\0"
2672+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
2673+ "GL_DEPTH_WRITEMASK\0"
2674+ "GL_DIFFUSE\0"
2675+ "GL_DITHER\0"
2676+ "GL_DOMAIN\0"
2677+ "GL_DONT_CARE\0"
2678+ "GL_DOT3_RGB\0"
2679+ "GL_DOT3_RGBA\0"
2680+ "GL_DOT3_RGBA_ARB\0"
2681+ "GL_DOT3_RGBA_EXT\0"
2682+ "GL_DOT3_RGB_ARB\0"
2683+ "GL_DOT3_RGB_EXT\0"
2684+ "GL_DOUBLE\0"
2685+ "GL_DOUBLEBUFFER\0"
2686+ "GL_DRAW_BUFFER\0"
2687+ "GL_DRAW_BUFFER0\0"
2688+ "GL_DRAW_BUFFER0_ARB\0"
2689+ "GL_DRAW_BUFFER0_ATI\0"
2690+ "GL_DRAW_BUFFER1\0"
2691+ "GL_DRAW_BUFFER10\0"
2692+ "GL_DRAW_BUFFER10_ARB\0"
2693+ "GL_DRAW_BUFFER10_ATI\0"
2694+ "GL_DRAW_BUFFER11\0"
2695+ "GL_DRAW_BUFFER11_ARB\0"
2696+ "GL_DRAW_BUFFER11_ATI\0"
2697+ "GL_DRAW_BUFFER12\0"
2698+ "GL_DRAW_BUFFER12_ARB\0"
2699+ "GL_DRAW_BUFFER12_ATI\0"
2700+ "GL_DRAW_BUFFER13\0"
2701+ "GL_DRAW_BUFFER13_ARB\0"
2702+ "GL_DRAW_BUFFER13_ATI\0"
2703+ "GL_DRAW_BUFFER14\0"
2704+ "GL_DRAW_BUFFER14_ARB\0"
2705+ "GL_DRAW_BUFFER14_ATI\0"
2706+ "GL_DRAW_BUFFER15\0"
2707+ "GL_DRAW_BUFFER15_ARB\0"
2708+ "GL_DRAW_BUFFER15_ATI\0"
2709+ "GL_DRAW_BUFFER1_ARB\0"
2710+ "GL_DRAW_BUFFER1_ATI\0"
2711+ "GL_DRAW_BUFFER2\0"
2712+ "GL_DRAW_BUFFER2_ARB\0"
2713+ "GL_DRAW_BUFFER2_ATI\0"
2714+ "GL_DRAW_BUFFER3\0"
2715+ "GL_DRAW_BUFFER3_ARB\0"
2716+ "GL_DRAW_BUFFER3_ATI\0"
2717+ "GL_DRAW_BUFFER4\0"
2718+ "GL_DRAW_BUFFER4_ARB\0"
2719+ "GL_DRAW_BUFFER4_ATI\0"
2720+ "GL_DRAW_BUFFER5\0"
2721+ "GL_DRAW_BUFFER5_ARB\0"
2722+ "GL_DRAW_BUFFER5_ATI\0"
2723+ "GL_DRAW_BUFFER6\0"
2724+ "GL_DRAW_BUFFER6_ARB\0"
2725+ "GL_DRAW_BUFFER6_ATI\0"
2726+ "GL_DRAW_BUFFER7\0"
2727+ "GL_DRAW_BUFFER7_ARB\0"
2728+ "GL_DRAW_BUFFER7_ATI\0"
2729+ "GL_DRAW_BUFFER8\0"
2730+ "GL_DRAW_BUFFER8_ARB\0"
2731+ "GL_DRAW_BUFFER8_ATI\0"
2732+ "GL_DRAW_BUFFER9\0"
2733+ "GL_DRAW_BUFFER9_ARB\0"
2734+ "GL_DRAW_BUFFER9_ATI\0"
2735+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
2736+ "GL_DRAW_FRAMEBUFFER_EXT\0"
2737+ "GL_DRAW_PIXEL_TOKEN\0"
2738+ "GL_DST_ALPHA\0"
2739+ "GL_DST_COLOR\0"
2740+ "GL_DYNAMIC_COPY\0"
2741+ "GL_DYNAMIC_COPY_ARB\0"
2742+ "GL_DYNAMIC_DRAW\0"
2743+ "GL_DYNAMIC_DRAW_ARB\0"
2744+ "GL_DYNAMIC_READ\0"
2745+ "GL_DYNAMIC_READ_ARB\0"
2746+ "GL_EDGE_FLAG\0"
2747+ "GL_EDGE_FLAG_ARRAY\0"
2748+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
2749+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
2750+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
2751+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
2752+ "GL_ELEMENT_ARRAY_BUFFER\0"
2753+ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
2754+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
2755+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
2756+ "GL_EMISSION\0"
2757+ "GL_ENABLE_BIT\0"
2758+ "GL_EQUAL\0"
2759+ "GL_EQUIV\0"
2760+ "GL_EVAL_BIT\0"
2761+ "GL_EXP\0"
2762+ "GL_EXP2\0"
2763+ "GL_EXTENSIONS\0"
2764+ "GL_EYE_LINEAR\0"
2765+ "GL_EYE_PLANE\0"
2766+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
2767+ "GL_EYE_RADIAL_NV\0"
2768+ "GL_FALSE\0"
2769+ "GL_FASTEST\0"
2770+ "GL_FEEDBACK\0"
2771+ "GL_FEEDBACK_BUFFER_POINTER\0"
2772+ "GL_FEEDBACK_BUFFER_SIZE\0"
2773+ "GL_FEEDBACK_BUFFER_TYPE\0"
2774+ "GL_FILL\0"
2775+ "GL_FLAT\0"
2776+ "GL_FLOAT\0"
2777+ "GL_FLOAT_MAT2\0"
2778+ "GL_FLOAT_MAT2_ARB\0"
2779+ "GL_FLOAT_MAT3\0"
2780+ "GL_FLOAT_MAT3_ARB\0"
2781+ "GL_FLOAT_MAT4\0"
2782+ "GL_FLOAT_MAT4_ARB\0"
2783+ "GL_FLOAT_VEC2\0"
2784+ "GL_FLOAT_VEC2_ARB\0"
2785+ "GL_FLOAT_VEC3\0"
2786+ "GL_FLOAT_VEC3_ARB\0"
2787+ "GL_FLOAT_VEC4\0"
2788+ "GL_FLOAT_VEC4_ARB\0"
2789+ "GL_FOG\0"
2790+ "GL_FOG_BIT\0"
2791+ "GL_FOG_COLOR\0"
2792+ "GL_FOG_COORD\0"
2793+ "GL_FOG_COORDINATE\0"
2794+ "GL_FOG_COORDINATE_ARRAY\0"
2795+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
2796+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
2797+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
2798+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
2799+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
2800+ "GL_FOG_COORDINATE_SOURCE\0"
2801+ "GL_FOG_COORD_ARRAY\0"
2802+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
2803+ "GL_FOG_COORD_ARRAY_POINTER\0"
2804+ "GL_FOG_COORD_ARRAY_STRIDE\0"
2805+ "GL_FOG_COORD_ARRAY_TYPE\0"
2806+ "GL_FOG_COORD_SRC\0"
2807+ "GL_FOG_DENSITY\0"
2808+ "GL_FOG_DISTANCE_MODE_NV\0"
2809+ "GL_FOG_END\0"
2810+ "GL_FOG_HINT\0"
2811+ "GL_FOG_INDEX\0"
2812+ "GL_FOG_MODE\0"
2813+ "GL_FOG_OFFSET_SGIX\0"
2814+ "GL_FOG_OFFSET_VALUE_SGIX\0"
2815+ "GL_FOG_START\0"
2816+ "GL_FRAGMENT_DEPTH\0"
2817+ "GL_FRAGMENT_PROGRAM_ARB\0"
2818+ "GL_FRAGMENT_SHADER\0"
2819+ "GL_FRAGMENT_SHADER_ARB\0"
2820+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
2821+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
2822+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
2823+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
2824+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
2825+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
2826+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
2827+ "GL_FRAMEBUFFER_BINDING_EXT\0"
2828+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
2829+ "GL_FRAMEBUFFER_EXT\0"
2830+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
2831+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
2832+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
2833+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
2834+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
2835+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
2836+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
2837+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
2838+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
2839+ "GL_FRONT\0"
2840+ "GL_FRONT_AND_BACK\0"
2841+ "GL_FRONT_FACE\0"
2842+ "GL_FRONT_LEFT\0"
2843+ "GL_FRONT_RIGHT\0"
2844+ "GL_FUNC_ADD\0"
2845+ "GL_FUNC_ADD_EXT\0"
2846+ "GL_FUNC_REVERSE_SUBTRACT\0"
2847+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
2848+ "GL_FUNC_SUBTRACT\0"
2849+ "GL_FUNC_SUBTRACT_EXT\0"
2850+ "GL_GENERATE_MIPMAP\0"
2851+ "GL_GENERATE_MIPMAP_HINT\0"
2852+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
2853+ "GL_GENERATE_MIPMAP_SGIS\0"
2854+ "GL_GEQUAL\0"
2855+ "GL_GL_BLEND_EQUATION_RGB\0"
2856+ "GL_GL_COMPRESSED_SLUMINANCE\0"
2857+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
2858+ "GL_GL_COMPRESSED_SRGB\0"
2859+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
2860+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
2861+ "GL_GL_FLOAT_MAT2x3\0"
2862+ "GL_GL_FLOAT_MAT2x4\0"
2863+ "GL_GL_FLOAT_MAT3x2\0"
2864+ "GL_GL_FLOAT_MAT3x4\0"
2865+ "GL_GL_FLOAT_MAT4x2\0"
2866+ "GL_GL_FLOAT_MAT4x3\0"
2867+ "GL_GL_PIXEL_PACK_BUFFER\0"
2868+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
2869+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
2870+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
2871+ "GL_GL_SLUMINANCE\0"
2872+ "GL_GL_SLUMINANCE8\0"
2873+ "GL_GL_SLUMINANCE8_ALPHA8\0"
2874+ "GL_GL_SLUMINANCE_ALPHA\0"
2875+ "GL_GL_SRGB\0"
2876+ "GL_GL_SRGB8\0"
2877+ "GL_GL_SRGB8_ALPHA8\0"
2878+ "GL_GL_SRGB_ALPHA\0"
2879+ "GL_GREATER\0"
2880+ "GL_GREEN\0"
2881+ "GL_GREEN_BIAS\0"
2882+ "GL_GREEN_BITS\0"
2883+ "GL_GREEN_SCALE\0"
2884+ "GL_HINT_BIT\0"
2885+ "GL_HISTOGRAM\0"
2886+ "GL_HISTOGRAM_ALPHA_SIZE\0"
2887+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
2888+ "GL_HISTOGRAM_BLUE_SIZE\0"
2889+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
2890+ "GL_HISTOGRAM_EXT\0"
2891+ "GL_HISTOGRAM_FORMAT\0"
2892+ "GL_HISTOGRAM_FORMAT_EXT\0"
2893+ "GL_HISTOGRAM_GREEN_SIZE\0"
2894+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
2895+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
2896+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
2897+ "GL_HISTOGRAM_RED_SIZE\0"
2898+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
2899+ "GL_HISTOGRAM_SINK\0"
2900+ "GL_HISTOGRAM_SINK_EXT\0"
2901+ "GL_HISTOGRAM_WIDTH\0"
2902+ "GL_HISTOGRAM_WIDTH_EXT\0"
2903+ "GL_IDENTITY_NV\0"
2904+ "GL_IGNORE_BORDER_HP\0"
2905+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
2906+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
2907+ "GL_INCR\0"
2908+ "GL_INCR_WRAP\0"
2909+ "GL_INCR_WRAP_EXT\0"
2910+ "GL_INDEX_ARRAY\0"
2911+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
2912+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
2913+ "GL_INDEX_ARRAY_POINTER\0"
2914+ "GL_INDEX_ARRAY_STRIDE\0"
2915+ "GL_INDEX_ARRAY_TYPE\0"
2916+ "GL_INDEX_BITS\0"
2917+ "GL_INDEX_CLEAR_VALUE\0"
2918+ "GL_INDEX_LOGIC_OP\0"
2919+ "GL_INDEX_MODE\0"
2920+ "GL_INDEX_OFFSET\0"
2921+ "GL_INDEX_SHIFT\0"
2922+ "GL_INDEX_WRITEMASK\0"
2923+ "GL_INFO_LOG_LENGTH\0"
2924+ "GL_INT\0"
2925+ "GL_INTENSITY\0"
2926+ "GL_INTENSITY12\0"
2927+ "GL_INTENSITY12_EXT\0"
2928+ "GL_INTENSITY16\0"
2929+ "GL_INTENSITY16_EXT\0"
2930+ "GL_INTENSITY4\0"
2931+ "GL_INTENSITY4_EXT\0"
2932+ "GL_INTENSITY8\0"
2933+ "GL_INTENSITY8_EXT\0"
2934+ "GL_INTENSITY_EXT\0"
2935+ "GL_INTERPOLATE\0"
2936+ "GL_INTERPOLATE_ARB\0"
2937+ "GL_INTERPOLATE_EXT\0"
2938+ "GL_INT_VEC2\0"
2939+ "GL_INT_VEC2_ARB\0"
2940+ "GL_INT_VEC3\0"
2941+ "GL_INT_VEC3_ARB\0"
2942+ "GL_INT_VEC4\0"
2943+ "GL_INT_VEC4_ARB\0"
2944+ "GL_INVALID_ENUM\0"
2945+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
2946+ "GL_INVALID_OPERATION\0"
2947+ "GL_INVALID_VALUE\0"
2948+ "GL_INVERSE_NV\0"
2949+ "GL_INVERSE_TRANSPOSE_NV\0"
2950+ "GL_INVERT\0"
2951+ "GL_KEEP\0"
2952+ "GL_LEFT\0"
2953+ "GL_LEQUAL\0"
2954+ "GL_LESS\0"
2955+ "GL_LIGHT0\0"
2956+ "GL_LIGHT1\0"
2957+ "GL_LIGHT2\0"
2958+ "GL_LIGHT3\0"
2959+ "GL_LIGHT4\0"
2960+ "GL_LIGHT5\0"
2961+ "GL_LIGHT6\0"
2962+ "GL_LIGHT7\0"
2963+ "GL_LIGHTING\0"
2964+ "GL_LIGHTING_BIT\0"
2965+ "GL_LIGHT_MODEL_AMBIENT\0"
2966+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
2967+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
2968+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
2969+ "GL_LIGHT_MODEL_TWO_SIDE\0"
2970+ "GL_LINE\0"
2971+ "GL_LINEAR\0"
2972+ "GL_LINEAR_ATTENUATION\0"
2973+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
2974+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
2975+ "GL_LINEAR_MIPMAP_LINEAR\0"
2976+ "GL_LINEAR_MIPMAP_NEAREST\0"
2977+ "GL_LINES\0"
2978+ "GL_LINE_BIT\0"
2979+ "GL_LINE_LOOP\0"
2980+ "GL_LINE_RESET_TOKEN\0"
2981+ "GL_LINE_SMOOTH\0"
2982+ "GL_LINE_SMOOTH_HINT\0"
2983+ "GL_LINE_STIPPLE\0"
2984+ "GL_LINE_STIPPLE_PATTERN\0"
2985+ "GL_LINE_STIPPLE_REPEAT\0"
2986+ "GL_LINE_STRIP\0"
2987+ "GL_LINE_TOKEN\0"
2988+ "GL_LINE_WIDTH\0"
2989+ "GL_LINE_WIDTH_GRANULARITY\0"
2990+ "GL_LINE_WIDTH_RANGE\0"
2991+ "GL_LINK_STATUS\0"
2992+ "GL_LIST_BASE\0"
2993+ "GL_LIST_BIT\0"
2994+ "GL_LIST_INDEX\0"
2995+ "GL_LIST_MODE\0"
2996+ "GL_LOAD\0"
2997+ "GL_LOGIC_OP\0"
2998+ "GL_LOGIC_OP_MODE\0"
2999+ "GL_LOWER_LEFT\0"
3000+ "GL_LUMINANCE\0"
3001+ "GL_LUMINANCE12\0"
3002+ "GL_LUMINANCE12_ALPHA12\0"
3003+ "GL_LUMINANCE12_ALPHA12_EXT\0"
3004+ "GL_LUMINANCE12_ALPHA4\0"
3005+ "GL_LUMINANCE12_ALPHA4_EXT\0"
3006+ "GL_LUMINANCE12_EXT\0"
3007+ "GL_LUMINANCE16\0"
3008+ "GL_LUMINANCE16_ALPHA16\0"
3009+ "GL_LUMINANCE16_ALPHA16_EXT\0"
3010+ "GL_LUMINANCE16_EXT\0"
3011+ "GL_LUMINANCE4\0"
3012+ "GL_LUMINANCE4_ALPHA4\0"
3013+ "GL_LUMINANCE4_ALPHA4_EXT\0"
3014+ "GL_LUMINANCE4_EXT\0"
3015+ "GL_LUMINANCE6_ALPHA2\0"
3016+ "GL_LUMINANCE6_ALPHA2_EXT\0"
3017+ "GL_LUMINANCE8\0"
3018+ "GL_LUMINANCE8_ALPHA8\0"
3019+ "GL_LUMINANCE8_ALPHA8_EXT\0"
3020+ "GL_LUMINANCE8_EXT\0"
3021+ "GL_LUMINANCE_ALPHA\0"
3022+ "GL_MAP1_COLOR_4\0"
3023+ "GL_MAP1_GRID_DOMAIN\0"
3024+ "GL_MAP1_GRID_SEGMENTS\0"
3025+ "GL_MAP1_INDEX\0"
3026+ "GL_MAP1_NORMAL\0"
3027+ "GL_MAP1_TEXTURE_COORD_1\0"
3028+ "GL_MAP1_TEXTURE_COORD_2\0"
3029+ "GL_MAP1_TEXTURE_COORD_3\0"
3030+ "GL_MAP1_TEXTURE_COORD_4\0"
3031+ "GL_MAP1_VERTEX_3\0"
3032+ "GL_MAP1_VERTEX_4\0"
3033+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
3034+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
3035+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
3036+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
3037+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
3038+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
3039+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
3040+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
3041+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
3042+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
3043+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
3044+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
3045+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
3046+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
3047+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
3048+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
3049+ "GL_MAP2_COLOR_4\0"
3050+ "GL_MAP2_GRID_DOMAIN\0"
3051+ "GL_MAP2_GRID_SEGMENTS\0"
3052+ "GL_MAP2_INDEX\0"
3053+ "GL_MAP2_NORMAL\0"
3054+ "GL_MAP2_TEXTURE_COORD_1\0"
3055+ "GL_MAP2_TEXTURE_COORD_2\0"
3056+ "GL_MAP2_TEXTURE_COORD_3\0"
3057+ "GL_MAP2_TEXTURE_COORD_4\0"
3058+ "GL_MAP2_VERTEX_3\0"
3059+ "GL_MAP2_VERTEX_4\0"
3060+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
3061+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
3062+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
3063+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
3064+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
3065+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
3066+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
3067+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
3068+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
3069+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
3070+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
3071+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
3072+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
3073+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
3074+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
3075+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
3076+ "GL_MAP_COLOR\0"
3077+ "GL_MAP_STENCIL\0"
3078+ "GL_MATRIX0_ARB\0"
3079+ "GL_MATRIX0_NV\0"
3080+ "GL_MATRIX10_ARB\0"
3081+ "GL_MATRIX11_ARB\0"
3082+ "GL_MATRIX12_ARB\0"
3083+ "GL_MATRIX13_ARB\0"
3084+ "GL_MATRIX14_ARB\0"
3085+ "GL_MATRIX15_ARB\0"
3086+ "GL_MATRIX16_ARB\0"
3087+ "GL_MATRIX17_ARB\0"
3088+ "GL_MATRIX18_ARB\0"
3089+ "GL_MATRIX19_ARB\0"
3090+ "GL_MATRIX1_ARB\0"
3091+ "GL_MATRIX1_NV\0"
3092+ "GL_MATRIX20_ARB\0"
3093+ "GL_MATRIX21_ARB\0"
3094+ "GL_MATRIX22_ARB\0"
3095+ "GL_MATRIX23_ARB\0"
3096+ "GL_MATRIX24_ARB\0"
3097+ "GL_MATRIX25_ARB\0"
3098+ "GL_MATRIX26_ARB\0"
3099+ "GL_MATRIX27_ARB\0"
3100+ "GL_MATRIX28_ARB\0"
3101+ "GL_MATRIX29_ARB\0"
3102+ "GL_MATRIX2_ARB\0"
3103+ "GL_MATRIX2_NV\0"
3104+ "GL_MATRIX30_ARB\0"
3105+ "GL_MATRIX31_ARB\0"
3106+ "GL_MATRIX3_ARB\0"
3107+ "GL_MATRIX3_NV\0"
3108+ "GL_MATRIX4_ARB\0"
3109+ "GL_MATRIX4_NV\0"
3110+ "GL_MATRIX5_ARB\0"
3111+ "GL_MATRIX5_NV\0"
3112+ "GL_MATRIX6_ARB\0"
3113+ "GL_MATRIX6_NV\0"
3114+ "GL_MATRIX7_ARB\0"
3115+ "GL_MATRIX7_NV\0"
3116+ "GL_MATRIX8_ARB\0"
3117+ "GL_MATRIX9_ARB\0"
3118+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
3119+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
3120+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
3121+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
3122+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
3123+ "GL_MATRIX_MODE\0"
3124+ "GL_MATRIX_PALETTE_ARB\0"
3125+ "GL_MAX\0"
3126+ "GL_MAX_3D_TEXTURE_SIZE\0"
3127+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
3128+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
3129+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
3130+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
3131+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3132+ "GL_MAX_CLIP_PLANES\0"
3133+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
3134+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
3135+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
3136+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
3137+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
3138+ "GL_MAX_CONVOLUTION_HEIGHT\0"
3139+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
3140+ "GL_MAX_CONVOLUTION_WIDTH\0"
3141+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
3142+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
3143+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
3144+ "GL_MAX_DRAW_BUFFERS\0"
3145+ "GL_MAX_DRAW_BUFFERS_ARB\0"
3146+ "GL_MAX_DRAW_BUFFERS_ATI\0"
3147+ "GL_MAX_ELEMENTS_INDICES\0"
3148+ "GL_MAX_ELEMENTS_VERTICES\0"
3149+ "GL_MAX_EVAL_ORDER\0"
3150+ "GL_MAX_EXT\0"
3151+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
3152+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
3153+ "GL_MAX_LIGHTS\0"
3154+ "GL_MAX_LIST_NESTING\0"
3155+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
3156+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
3157+ "GL_MAX_NAME_STACK_DEPTH\0"
3158+ "GL_MAX_PALETTE_MATRICES_ARB\0"
3159+ "GL_MAX_PIXEL_MAP_TABLE\0"
3160+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3161+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3162+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
3163+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
3164+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
3165+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
3166+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
3167+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
3168+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
3169+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
3170+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
3171+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
3172+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
3173+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3174+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3175+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3176+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3177+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3178+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3179+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3180+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3181+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
3182+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
3183+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3184+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3185+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
3186+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
3187+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
3188+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
3189+ "GL_MAX_SHININESS_NV\0"
3190+ "GL_MAX_SPOT_EXPONENT_NV\0"
3191+ "GL_MAX_TEXTURE_COORDS\0"
3192+ "GL_MAX_TEXTURE_COORDS_ARB\0"
3193+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
3194+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
3195+ "GL_MAX_TEXTURE_LOD_BIAS\0"
3196+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
3197+ "GL_MAX_TEXTURE_SIZE\0"
3198+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
3199+ "GL_MAX_TEXTURE_UNITS\0"
3200+ "GL_MAX_TEXTURE_UNITS_ARB\0"
3201+ "GL_MAX_TRACK_MATRICES_NV\0"
3202+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
3203+ "GL_MAX_VARYING_FLOATS\0"
3204+ "GL_MAX_VARYING_FLOATS_ARB\0"
3205+ "GL_MAX_VERTEX_ATTRIBS\0"
3206+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
3207+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
3208+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
3209+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
3210+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
3211+ "GL_MAX_VERTEX_UNITS_ARB\0"
3212+ "GL_MAX_VIEWPORT_DIMS\0"
3213+ "GL_MIN\0"
3214+ "GL_MINMAX\0"
3215+ "GL_MINMAX_EXT\0"
3216+ "GL_MINMAX_FORMAT\0"
3217+ "GL_MINMAX_FORMAT_EXT\0"
3218+ "GL_MINMAX_SINK\0"
3219+ "GL_MINMAX_SINK_EXT\0"
3220+ "GL_MIN_EXT\0"
3221+ "GL_MIRRORED_REPEAT\0"
3222+ "GL_MIRRORED_REPEAT_ARB\0"
3223+ "GL_MIRRORED_REPEAT_IBM\0"
3224+ "GL_MIRROR_CLAMP_ATI\0"
3225+ "GL_MIRROR_CLAMP_EXT\0"
3226+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
3227+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
3228+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
3229+ "GL_MODELVIEW\0"
3230+ "GL_MODELVIEW0_ARB\0"
3231+ "GL_MODELVIEW10_ARB\0"
3232+ "GL_MODELVIEW11_ARB\0"
3233+ "GL_MODELVIEW12_ARB\0"
3234+ "GL_MODELVIEW13_ARB\0"
3235+ "GL_MODELVIEW14_ARB\0"
3236+ "GL_MODELVIEW15_ARB\0"
3237+ "GL_MODELVIEW16_ARB\0"
3238+ "GL_MODELVIEW17_ARB\0"
3239+ "GL_MODELVIEW18_ARB\0"
3240+ "GL_MODELVIEW19_ARB\0"
3241+ "GL_MODELVIEW1_ARB\0"
3242+ "GL_MODELVIEW20_ARB\0"
3243+ "GL_MODELVIEW21_ARB\0"
3244+ "GL_MODELVIEW22_ARB\0"
3245+ "GL_MODELVIEW23_ARB\0"
3246+ "GL_MODELVIEW24_ARB\0"
3247+ "GL_MODELVIEW25_ARB\0"
3248+ "GL_MODELVIEW26_ARB\0"
3249+ "GL_MODELVIEW27_ARB\0"
3250+ "GL_MODELVIEW28_ARB\0"
3251+ "GL_MODELVIEW29_ARB\0"
3252+ "GL_MODELVIEW2_ARB\0"
3253+ "GL_MODELVIEW30_ARB\0"
3254+ "GL_MODELVIEW31_ARB\0"
3255+ "GL_MODELVIEW3_ARB\0"
3256+ "GL_MODELVIEW4_ARB\0"
3257+ "GL_MODELVIEW5_ARB\0"
3258+ "GL_MODELVIEW6_ARB\0"
3259+ "GL_MODELVIEW7_ARB\0"
3260+ "GL_MODELVIEW8_ARB\0"
3261+ "GL_MODELVIEW9_ARB\0"
3262+ "GL_MODELVIEW_MATRIX\0"
3263+ "GL_MODELVIEW_PROJECTION_NV\0"
3264+ "GL_MODELVIEW_STACK_DEPTH\0"
3265+ "GL_MODULATE\0"
3266+ "GL_MODULATE_ADD_ATI\0"
3267+ "GL_MODULATE_SIGNED_ADD_ATI\0"
3268+ "GL_MODULATE_SUBTRACT_ATI\0"
3269+ "GL_MULT\0"
3270+ "GL_MULTISAMPLE\0"
3271+ "GL_MULTISAMPLE_3DFX\0"
3272+ "GL_MULTISAMPLE_ARB\0"
3273+ "GL_MULTISAMPLE_BIT\0"
3274+ "GL_MULTISAMPLE_BIT_3DFX\0"
3275+ "GL_MULTISAMPLE_BIT_ARB\0"
3276+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
3277+ "GL_N3F_V3F\0"
3278+ "GL_NAME_STACK_DEPTH\0"
3279+ "GL_NAND\0"
3280+ "GL_NEAREST\0"
3281+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
3282+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
3283+ "GL_NEAREST_MIPMAP_LINEAR\0"
3284+ "GL_NEAREST_MIPMAP_NEAREST\0"
3285+ "GL_NEVER\0"
3286+ "GL_NICEST\0"
3287+ "GL_NONE\0"
3288+ "GL_NOOP\0"
3289+ "GL_NOR\0"
3290+ "GL_NORMALIZE\0"
3291+ "GL_NORMAL_ARRAY\0"
3292+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
3293+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
3294+ "GL_NORMAL_ARRAY_POINTER\0"
3295+ "GL_NORMAL_ARRAY_STRIDE\0"
3296+ "GL_NORMAL_ARRAY_TYPE\0"
3297+ "GL_NORMAL_MAP\0"
3298+ "GL_NORMAL_MAP_ARB\0"
3299+ "GL_NORMAL_MAP_NV\0"
3300+ "GL_NOTEQUAL\0"
3301+ "GL_NO_ERROR\0"
3302+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
3303+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
3304+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
3305+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
3306+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
3307+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
3308+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
3309+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
3310+ "GL_OBJECT_DELETE_STATUS_ARB\0"
3311+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
3312+ "GL_OBJECT_LINEAR\0"
3313+ "GL_OBJECT_LINK_STATUS_ARB\0"
3314+ "GL_OBJECT_PLANE\0"
3315+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
3316+ "GL_OBJECT_SUBTYPE_ARB\0"
3317+ "GL_OBJECT_TYPE_ARB\0"
3318+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
3319+ "GL_OCCLUSION_TEST_HP\0"
3320+ "GL_OCCLUSION_TEST_RESULT_HP\0"
3321+ "GL_ONE\0"
3322+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
3323+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
3324+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
3325+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
3326+ "GL_ONE_MINUS_DST_ALPHA\0"
3327+ "GL_ONE_MINUS_DST_COLOR\0"
3328+ "GL_ONE_MINUS_SRC_ALPHA\0"
3329+ "GL_ONE_MINUS_SRC_COLOR\0"
3330+ "GL_OPERAND0_ALPHA\0"
3331+ "GL_OPERAND0_ALPHA_ARB\0"
3332+ "GL_OPERAND0_ALPHA_EXT\0"
3333+ "GL_OPERAND0_RGB\0"
3334+ "GL_OPERAND0_RGB_ARB\0"
3335+ "GL_OPERAND0_RGB_EXT\0"
3336+ "GL_OPERAND1_ALPHA\0"
3337+ "GL_OPERAND1_ALPHA_ARB\0"
3338+ "GL_OPERAND1_ALPHA_EXT\0"
3339+ "GL_OPERAND1_RGB\0"
3340+ "GL_OPERAND1_RGB_ARB\0"
3341+ "GL_OPERAND1_RGB_EXT\0"
3342+ "GL_OPERAND2_ALPHA\0"
3343+ "GL_OPERAND2_ALPHA_ARB\0"
3344+ "GL_OPERAND2_ALPHA_EXT\0"
3345+ "GL_OPERAND2_RGB\0"
3346+ "GL_OPERAND2_RGB_ARB\0"
3347+ "GL_OPERAND2_RGB_EXT\0"
3348+ "GL_OPERAND3_ALPHA_NV\0"
3349+ "GL_OPERAND3_RGB_NV\0"
3350+ "GL_OR\0"
3351+ "GL_ORDER\0"
3352+ "GL_OR_INVERTED\0"
3353+ "GL_OR_REVERSE\0"
3354+ "GL_OUT_OF_MEMORY\0"
3355+ "GL_PACK_ALIGNMENT\0"
3356+ "GL_PACK_IMAGE_HEIGHT\0"
3357+ "GL_PACK_INVERT_MESA\0"
3358+ "GL_PACK_LSB_FIRST\0"
3359+ "GL_PACK_ROW_LENGTH\0"
3360+ "GL_PACK_SKIP_IMAGES\0"
3361+ "GL_PACK_SKIP_PIXELS\0"
3362+ "GL_PACK_SKIP_ROWS\0"
3363+ "GL_PACK_SWAP_BYTES\0"
3364+ "GL_PALETTE4_R5_G6_B5_OES\0"
3365+ "GL_PALETTE4_RGB5_A1_OES\0"
3366+ "GL_PALETTE4_RGB8_OES\0"
3367+ "GL_PALETTE4_RGBA4_OES\0"
3368+ "GL_PALETTE4_RGBA8_OES\0"
3369+ "GL_PALETTE8_R5_G6_B5_OES\0"
3370+ "GL_PALETTE8_RGB5_A1_OES\0"
3371+ "GL_PALETTE8_RGB8_OES\0"
3372+ "GL_PALETTE8_RGBA4_OES\0"
3373+ "GL_PALETTE8_RGBA8_OES\0"
3374+ "GL_PASS_THROUGH_TOKEN\0"
3375+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
3376+ "GL_PIXEL_MAP_A_TO_A\0"
3377+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
3378+ "GL_PIXEL_MAP_B_TO_B\0"
3379+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
3380+ "GL_PIXEL_MAP_G_TO_G\0"
3381+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
3382+ "GL_PIXEL_MAP_I_TO_A\0"
3383+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
3384+ "GL_PIXEL_MAP_I_TO_B\0"
3385+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
3386+ "GL_PIXEL_MAP_I_TO_G\0"
3387+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
3388+ "GL_PIXEL_MAP_I_TO_I\0"
3389+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
3390+ "GL_PIXEL_MAP_I_TO_R\0"
3391+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
3392+ "GL_PIXEL_MAP_R_TO_R\0"
3393+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
3394+ "GL_PIXEL_MAP_S_TO_S\0"
3395+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
3396+ "GL_PIXEL_MODE_BIT\0"
3397+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
3398+ "GL_PIXEL_PACK_BUFFER_EXT\0"
3399+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
3400+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
3401+ "GL_POINT\0"
3402+ "GL_POINTS\0"
3403+ "GL_POINT_BIT\0"
3404+ "GL_POINT_DISTANCE_ATTENUATION\0"
3405+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
3406+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
3407+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
3408+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
3409+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
3410+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
3411+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
3412+ "GL_POINT_SIZE\0"
3413+ "GL_POINT_SIZE_GRANULARITY\0"
3414+ "GL_POINT_SIZE_MAX\0"
3415+ "GL_POINT_SIZE_MAX_ARB\0"
3416+ "GL_POINT_SIZE_MAX_EXT\0"
3417+ "GL_POINT_SIZE_MAX_SGIS\0"
3418+ "GL_POINT_SIZE_MIN\0"
3419+ "GL_POINT_SIZE_MIN_ARB\0"
3420+ "GL_POINT_SIZE_MIN_EXT\0"
3421+ "GL_POINT_SIZE_MIN_SGIS\0"
3422+ "GL_POINT_SIZE_RANGE\0"
3423+ "GL_POINT_SMOOTH\0"
3424+ "GL_POINT_SMOOTH_HINT\0"
3425+ "GL_POINT_SPRITE\0"
3426+ "GL_POINT_SPRITE_ARB\0"
3427+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
3428+ "GL_POINT_SPRITE_NV\0"
3429+ "GL_POINT_SPRITE_R_MODE_NV\0"
3430+ "GL_POINT_TOKEN\0"
3431+ "GL_POLYGON\0"
3432+ "GL_POLYGON_BIT\0"
3433+ "GL_POLYGON_MODE\0"
3434+ "GL_POLYGON_OFFSET_BIAS\0"
3435+ "GL_POLYGON_OFFSET_FACTOR\0"
3436+ "GL_POLYGON_OFFSET_FILL\0"
3437+ "GL_POLYGON_OFFSET_LINE\0"
3438+ "GL_POLYGON_OFFSET_POINT\0"
3439+ "GL_POLYGON_OFFSET_UNITS\0"
3440+ "GL_POLYGON_SMOOTH\0"
3441+ "GL_POLYGON_SMOOTH_HINT\0"
3442+ "GL_POLYGON_STIPPLE\0"
3443+ "GL_POLYGON_STIPPLE_BIT\0"
3444+ "GL_POLYGON_TOKEN\0"
3445+ "GL_POSITION\0"
3446+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
3447+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
3448+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
3449+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
3450+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
3451+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
3452+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
3453+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
3454+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
3455+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
3456+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
3457+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
3458+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
3459+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
3460+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
3461+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
3462+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
3463+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
3464+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
3465+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
3466+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
3467+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
3468+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
3469+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
3470+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
3471+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
3472+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
3473+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
3474+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
3475+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
3476+ "GL_POST_CONVOLUTION_RED_BIAS\0"
3477+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
3478+ "GL_POST_CONVOLUTION_RED_SCALE\0"
3479+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
3480+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
3481+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
3482+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
3483+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
3484+ "GL_PREVIOUS\0"
3485+ "GL_PREVIOUS_ARB\0"
3486+ "GL_PREVIOUS_EXT\0"
3487+ "GL_PRIMARY_COLOR\0"
3488+ "GL_PRIMARY_COLOR_ARB\0"
3489+ "GL_PRIMARY_COLOR_EXT\0"
3490+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3491+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3492+ "GL_PROGRAM_ATTRIBS_ARB\0"
3493+ "GL_PROGRAM_BINDING_ARB\0"
3494+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
3495+ "GL_PROGRAM_ERROR_POSITION_NV\0"
3496+ "GL_PROGRAM_ERROR_STRING_ARB\0"
3497+ "GL_PROGRAM_FORMAT_ARB\0"
3498+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
3499+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
3500+ "GL_PROGRAM_LENGTH_ARB\0"
3501+ "GL_PROGRAM_LENGTH_NV\0"
3502+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3503+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3504+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3505+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3506+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3507+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3508+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3509+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3510+ "GL_PROGRAM_OBJECT_ARB\0"
3511+ "GL_PROGRAM_PARAMETERS_ARB\0"
3512+ "GL_PROGRAM_PARAMETER_NV\0"
3513+ "GL_PROGRAM_RESIDENT_NV\0"
3514+ "GL_PROGRAM_STRING_ARB\0"
3515+ "GL_PROGRAM_STRING_NV\0"
3516+ "GL_PROGRAM_TARGET_NV\0"
3517+ "GL_PROGRAM_TEMPORARIES_ARB\0"
3518+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3519+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3520+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
3521+ "GL_PROJECTION\0"
3522+ "GL_PROJECTION_MATRIX\0"
3523+ "GL_PROJECTION_STACK_DEPTH\0"
3524+ "GL_PROXY_COLOR_TABLE\0"
3525+ "GL_PROXY_HISTOGRAM\0"
3526+ "GL_PROXY_HISTOGRAM_EXT\0"
3527+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
3528+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
3529+ "GL_PROXY_TEXTURE_1D\0"
3530+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
3531+ "GL_PROXY_TEXTURE_1D_EXT\0"
3532+ "GL_PROXY_TEXTURE_2D\0"
3533+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
3534+ "GL_PROXY_TEXTURE_2D_EXT\0"
3535+ "GL_PROXY_TEXTURE_3D\0"
3536+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
3537+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
3538+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
3539+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
3540+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
3541+ "GL_Q\0"
3542+ "GL_QUADRATIC_ATTENUATION\0"
3543+ "GL_QUADS\0"
3544+ "GL_QUAD_MESH_SUN\0"
3545+ "GL_QUAD_STRIP\0"
3546+ "GL_QUERY_COUNTER_BITS\0"
3547+ "GL_QUERY_COUNTER_BITS_ARB\0"
3548+ "GL_QUERY_RESULT\0"
3549+ "GL_QUERY_RESULT_ARB\0"
3550+ "GL_QUERY_RESULT_AVAILABLE\0"
3551+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
3552+ "GL_R\0"
3553+ "GL_R3_G3_B2\0"
3554+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
3555+ "GL_READ_BUFFER\0"
3556+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
3557+ "GL_READ_FRAMEBUFFER_EXT\0"
3558+ "GL_READ_ONLY\0"
3559+ "GL_READ_ONLY_ARB\0"
3560+ "GL_READ_WRITE\0"
3561+ "GL_READ_WRITE_ARB\0"
3562+ "GL_RED\0"
3563+ "GL_REDUCE\0"
3564+ "GL_REDUCE_EXT\0"
3565+ "GL_RED_BIAS\0"
3566+ "GL_RED_BITS\0"
3567+ "GL_RED_SCALE\0"
3568+ "GL_REFLECTION_MAP\0"
3569+ "GL_REFLECTION_MAP_ARB\0"
3570+ "GL_REFLECTION_MAP_NV\0"
3571+ "GL_RENDER\0"
3572+ "GL_RENDERBUFFER_BINDING_EXT\0"
3573+ "GL_RENDERBUFFER_EXT\0"
3574+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
3575+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
3576+ "GL_RENDERBUFFER_WIDTH_EXT\0"
3577+ "GL_RENDERER\0"
3578+ "GL_RENDER_MODE\0"
3579+ "GL_REPEAT\0"
3580+ "GL_REPLACE\0"
3581+ "GL_REPLACE_EXT\0"
3582+ "GL_REPLICATE_BORDER_HP\0"
3583+ "GL_RESCALE_NORMAL\0"
3584+ "GL_RESCALE_NORMAL_EXT\0"
3585+ "GL_RETURN\0"
3586+ "GL_RGB\0"
3587+ "GL_RGB10\0"
3588+ "GL_RGB10_A2\0"
3589+ "GL_RGB10_A2_EXT\0"
3590+ "GL_RGB10_EXT\0"
3591+ "GL_RGB12\0"
3592+ "GL_RGB12_EXT\0"
3593+ "GL_RGB16\0"
3594+ "GL_RGB16_EXT\0"
3595+ "GL_RGB2_EXT\0"
3596+ "GL_RGB4\0"
3597+ "GL_RGB4_EXT\0"
3598+ "GL_RGB4_S3TC\0"
3599+ "GL_RGB5\0"
3600+ "GL_RGB5_A1\0"
3601+ "GL_RGB5_A1_EXT\0"
3602+ "GL_RGB5_EXT\0"
3603+ "GL_RGB8\0"
3604+ "GL_RGB8_EXT\0"
3605+ "GL_RGBA\0"
3606+ "GL_RGBA12\0"
3607+ "GL_RGBA12_EXT\0"
3608+ "GL_RGBA16\0"
3609+ "GL_RGBA16_EXT\0"
3610+ "GL_RGBA2\0"
3611+ "GL_RGBA2_EXT\0"
3612+ "GL_RGBA4\0"
3613+ "GL_RGBA4_DXT5_S3TC\0"
3614+ "GL_RGBA4_EXT\0"
3615+ "GL_RGBA4_S3TC\0"
3616+ "GL_RGBA8\0"
3617+ "GL_RGBA8_EXT\0"
3618+ "GL_RGBA_DXT5_S3TC\0"
3619+ "GL_RGBA_MODE\0"
3620+ "GL_RGBA_S3TC\0"
3621+ "GL_RGB_S3TC\0"
3622+ "GL_RGB_SCALE\0"
3623+ "GL_RGB_SCALE_ARB\0"
3624+ "GL_RGB_SCALE_EXT\0"
3625+ "GL_RIGHT\0"
3626+ "GL_S\0"
3627+ "GL_SAMPLER_1D\0"
3628+ "GL_SAMPLER_1D_SHADOW\0"
3629+ "GL_SAMPLER_2D\0"
3630+ "GL_SAMPLER_2D_SHADOW\0"
3631+ "GL_SAMPLER_3D\0"
3632+ "GL_SAMPLER_CUBE\0"
3633+ "GL_SAMPLES\0"
3634+ "GL_SAMPLES_3DFX\0"
3635+ "GL_SAMPLES_ARB\0"
3636+ "GL_SAMPLES_PASSED\0"
3637+ "GL_SAMPLES_PASSED_ARB\0"
3638+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
3639+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
3640+ "GL_SAMPLE_ALPHA_TO_ONE\0"
3641+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
3642+ "GL_SAMPLE_BUFFERS\0"
3643+ "GL_SAMPLE_BUFFERS_3DFX\0"
3644+ "GL_SAMPLE_BUFFERS_ARB\0"
3645+ "GL_SAMPLE_COVERAGE\0"
3646+ "GL_SAMPLE_COVERAGE_ARB\0"
3647+ "GL_SAMPLE_COVERAGE_INVERT\0"
3648+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
3649+ "GL_SAMPLE_COVERAGE_VALUE\0"
3650+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
3651+ "GL_SCISSOR_BIT\0"
3652+ "GL_SCISSOR_BOX\0"
3653+ "GL_SCISSOR_TEST\0"
3654+ "GL_SECONDARY_COLOR_ARRAY\0"
3655+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
3656+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
3657+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
3658+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
3659+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
3660+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
3661+ "GL_SELECT\0"
3662+ "GL_SELECTION_BUFFER_POINTER\0"
3663+ "GL_SELECTION_BUFFER_SIZE\0"
3664+ "GL_SEPARABLE_2D\0"
3665+ "GL_SEPARATE_SPECULAR_COLOR\0"
3666+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
3667+ "GL_SET\0"
3668+ "GL_SHADER_OBJECT_ARB\0"
3669+ "GL_SHADER_SOURCE_LENGTH\0"
3670+ "GL_SHADER_TYPE\0"
3671+ "GL_SHADE_MODEL\0"
3672+ "GL_SHADING_LANGUAGE_VERSION\0"
3673+ "GL_SHADOW_AMBIENT_SGIX\0"
3674+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
3675+ "GL_SHININESS\0"
3676+ "GL_SHORT\0"
3677+ "GL_SINGLE_COLOR\0"
3678+ "GL_SINGLE_COLOR_EXT\0"
3679+ "GL_SLICE_ACCUM_SUN\0"
3680+ "GL_SMOOTH\0"
3681+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
3682+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
3683+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
3684+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
3685+ "GL_SOURCE0_ALPHA\0"
3686+ "GL_SOURCE0_ALPHA_ARB\0"
3687+ "GL_SOURCE0_ALPHA_EXT\0"
3688+ "GL_SOURCE0_RGB\0"
3689+ "GL_SOURCE0_RGB_ARB\0"
3690+ "GL_SOURCE0_RGB_EXT\0"
3691+ "GL_SOURCE1_ALPHA\0"
3692+ "GL_SOURCE1_ALPHA_ARB\0"
3693+ "GL_SOURCE1_ALPHA_EXT\0"
3694+ "GL_SOURCE1_RGB\0"
3695+ "GL_SOURCE1_RGB_ARB\0"
3696+ "GL_SOURCE1_RGB_EXT\0"
3697+ "GL_SOURCE2_ALPHA\0"
3698+ "GL_SOURCE2_ALPHA_ARB\0"
3699+ "GL_SOURCE2_ALPHA_EXT\0"
3700+ "GL_SOURCE2_RGB\0"
3701+ "GL_SOURCE2_RGB_ARB\0"
3702+ "GL_SOURCE2_RGB_EXT\0"
3703+ "GL_SOURCE3_ALPHA_NV\0"
3704+ "GL_SOURCE3_RGB_NV\0"
3705+ "GL_SPECULAR\0"
3706+ "GL_SPHERE_MAP\0"
3707+ "GL_SPOT_CUTOFF\0"
3708+ "GL_SPOT_DIRECTION\0"
3709+ "GL_SPOT_EXPONENT\0"
3710+ "GL_SRC0_ALPHA\0"
3711+ "GL_SRC0_RGB\0"
3712+ "GL_SRC1_ALPHA\0"
3713+ "GL_SRC1_RGB\0"
3714+ "GL_SRC2_ALPHA\0"
3715+ "GL_SRC2_RGB\0"
3716+ "GL_SRC_ALPHA\0"
3717+ "GL_SRC_ALPHA_SATURATE\0"
3718+ "GL_SRC_COLOR\0"
3719+ "GL_STACK_OVERFLOW\0"
3720+ "GL_STACK_UNDERFLOW\0"
3721+ "GL_STATIC_COPY\0"
3722+ "GL_STATIC_COPY_ARB\0"
3723+ "GL_STATIC_DRAW\0"
3724+ "GL_STATIC_DRAW_ARB\0"
3725+ "GL_STATIC_READ\0"
3726+ "GL_STATIC_READ_ARB\0"
3727+ "GL_STENCIL\0"
3728+ "GL_STENCIL_ATTACHMENT_EXT\0"
3729+ "GL_STENCIL_BACK_FAIL\0"
3730+ "GL_STENCIL_BACK_FUNC\0"
3731+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
3732+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
3733+ "GL_STENCIL_BACK_REF\0"
3734+ "GL_STENCIL_BACK_VALUE_MASK\0"
3735+ "GL_STENCIL_BACK_WRITEMASK\0"
3736+ "GL_STENCIL_BITS\0"
3737+ "GL_STENCIL_BUFFER_BIT\0"
3738+ "GL_STENCIL_CLEAR_VALUE\0"
3739+ "GL_STENCIL_FAIL\0"
3740+ "GL_STENCIL_FUNC\0"
3741+ "GL_STENCIL_INDEX\0"
3742+ "GL_STENCIL_INDEX16_EXT\0"
3743+ "GL_STENCIL_INDEX1_EXT\0"
3744+ "GL_STENCIL_INDEX4_EXT\0"
3745+ "GL_STENCIL_INDEX8_EXT\0"
3746+ "GL_STENCIL_INDEX_EXT\0"
3747+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
3748+ "GL_STENCIL_PASS_DEPTH_PASS\0"
3749+ "GL_STENCIL_REF\0"
3750+ "GL_STENCIL_TEST\0"
3751+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
3752+ "GL_STENCIL_VALUE_MASK\0"
3753+ "GL_STENCIL_WRITEMASK\0"
3754+ "GL_STEREO\0"
3755+ "GL_STREAM_COPY\0"
3756+ "GL_STREAM_COPY_ARB\0"
3757+ "GL_STREAM_DRAW\0"
3758+ "GL_STREAM_DRAW_ARB\0"
3759+ "GL_STREAM_READ\0"
3760+ "GL_STREAM_READ_ARB\0"
3761+ "GL_SUBPIXEL_BITS\0"
3762+ "GL_SUBTRACT\0"
3763+ "GL_SUBTRACT_ARB\0"
3764+ "GL_T\0"
3765+ "GL_T2F_C3F_V3F\0"
3766+ "GL_T2F_C4F_N3F_V3F\0"
3767+ "GL_T2F_C4UB_V3F\0"
3768+ "GL_T2F_N3F_V3F\0"
3769+ "GL_T2F_V3F\0"
3770+ "GL_T4F_C4F_N3F_V4F\0"
3771+ "GL_T4F_V4F\0"
3772+ "GL_TABLE_TOO_LARGE_EXT\0"
3773+ "GL_TEXTURE\0"
3774+ "GL_TEXTURE0\0"
3775+ "GL_TEXTURE0_ARB\0"
3776+ "GL_TEXTURE1\0"
3777+ "GL_TEXTURE10\0"
3778+ "GL_TEXTURE10_ARB\0"
3779+ "GL_TEXTURE11\0"
3780+ "GL_TEXTURE11_ARB\0"
3781+ "GL_TEXTURE12\0"
3782+ "GL_TEXTURE12_ARB\0"
3783+ "GL_TEXTURE13\0"
3784+ "GL_TEXTURE13_ARB\0"
3785+ "GL_TEXTURE14\0"
3786+ "GL_TEXTURE14_ARB\0"
3787+ "GL_TEXTURE15\0"
3788+ "GL_TEXTURE15_ARB\0"
3789+ "GL_TEXTURE16\0"
3790+ "GL_TEXTURE16_ARB\0"
3791+ "GL_TEXTURE17\0"
3792+ "GL_TEXTURE17_ARB\0"
3793+ "GL_TEXTURE18\0"
3794+ "GL_TEXTURE18_ARB\0"
3795+ "GL_TEXTURE19\0"
3796+ "GL_TEXTURE19_ARB\0"
3797+ "GL_TEXTURE1_ARB\0"
3798+ "GL_TEXTURE2\0"
3799+ "GL_TEXTURE20\0"
3800+ "GL_TEXTURE20_ARB\0"
3801+ "GL_TEXTURE21\0"
3802+ "GL_TEXTURE21_ARB\0"
3803+ "GL_TEXTURE22\0"
3804+ "GL_TEXTURE22_ARB\0"
3805+ "GL_TEXTURE23\0"
3806+ "GL_TEXTURE23_ARB\0"
3807+ "GL_TEXTURE24\0"
3808+ "GL_TEXTURE24_ARB\0"
3809+ "GL_TEXTURE25\0"
3810+ "GL_TEXTURE25_ARB\0"
3811+ "GL_TEXTURE26\0"
3812+ "GL_TEXTURE26_ARB\0"
3813+ "GL_TEXTURE27\0"
3814+ "GL_TEXTURE27_ARB\0"
3815+ "GL_TEXTURE28\0"
3816+ "GL_TEXTURE28_ARB\0"
3817+ "GL_TEXTURE29\0"
3818+ "GL_TEXTURE29_ARB\0"
3819+ "GL_TEXTURE2_ARB\0"
3820+ "GL_TEXTURE3\0"
3821+ "GL_TEXTURE30\0"
3822+ "GL_TEXTURE30_ARB\0"
3823+ "GL_TEXTURE31\0"
3824+ "GL_TEXTURE31_ARB\0"
3825+ "GL_TEXTURE3_ARB\0"
3826+ "GL_TEXTURE4\0"
3827+ "GL_TEXTURE4_ARB\0"
3828+ "GL_TEXTURE5\0"
3829+ "GL_TEXTURE5_ARB\0"
3830+ "GL_TEXTURE6\0"
3831+ "GL_TEXTURE6_ARB\0"
3832+ "GL_TEXTURE7\0"
3833+ "GL_TEXTURE7_ARB\0"
3834+ "GL_TEXTURE8\0"
3835+ "GL_TEXTURE8_ARB\0"
3836+ "GL_TEXTURE9\0"
3837+ "GL_TEXTURE9_ARB\0"
3838+ "GL_TEXTURE_1D\0"
3839+ "GL_TEXTURE_1D_ARRAY_EXT\0"
3840+ "GL_TEXTURE_2D\0"
3841+ "GL_TEXTURE_2D_ARRAY_EXT\0"
3842+ "GL_TEXTURE_3D\0"
3843+ "GL_TEXTURE_ALPHA_SIZE\0"
3844+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
3845+ "GL_TEXTURE_BASE_LEVEL\0"
3846+ "GL_TEXTURE_BINDING_1D\0"
3847+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
3848+ "GL_TEXTURE_BINDING_2D\0"
3849+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
3850+ "GL_TEXTURE_BINDING_3D\0"
3851+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
3852+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
3853+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
3854+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
3855+ "GL_TEXTURE_BIT\0"
3856+ "GL_TEXTURE_BLUE_SIZE\0"
3857+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
3858+ "GL_TEXTURE_BORDER\0"
3859+ "GL_TEXTURE_BORDER_COLOR\0"
3860+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
3861+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
3862+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
3863+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
3864+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
3865+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3866+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
3867+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
3868+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
3869+ "GL_TEXTURE_COMPARE_FUNC\0"
3870+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
3871+ "GL_TEXTURE_COMPARE_MODE\0"
3872+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
3873+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
3874+ "GL_TEXTURE_COMPARE_SGIX\0"
3875+ "GL_TEXTURE_COMPONENTS\0"
3876+ "GL_TEXTURE_COMPRESSED\0"
3877+ "GL_TEXTURE_COMPRESSED_ARB\0"
3878+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
3879+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
3880+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
3881+ "GL_TEXTURE_COMPRESSION_HINT\0"
3882+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
3883+ "GL_TEXTURE_COORD_ARRAY\0"
3884+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
3885+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
3886+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
3887+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
3888+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
3889+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
3890+ "GL_TEXTURE_CUBE_MAP\0"
3891+ "GL_TEXTURE_CUBE_MAP_ARB\0"
3892+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
3893+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
3894+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
3895+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
3896+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
3897+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
3898+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
3899+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
3900+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
3901+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
3902+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
3903+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
3904+ "GL_TEXTURE_DEPTH\0"
3905+ "GL_TEXTURE_DEPTH_SIZE\0"
3906+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
3907+ "GL_TEXTURE_ENV\0"
3908+ "GL_TEXTURE_ENV_COLOR\0"
3909+ "GL_TEXTURE_ENV_MODE\0"
3910+ "GL_TEXTURE_FILTER_CONTROL\0"
3911+ "GL_TEXTURE_GEN_MODE\0"
3912+ "GL_TEXTURE_GEN_Q\0"
3913+ "GL_TEXTURE_GEN_R\0"
3914+ "GL_TEXTURE_GEN_S\0"
3915+ "GL_TEXTURE_GEN_T\0"
3916+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
3917+ "GL_TEXTURE_GREEN_SIZE\0"
3918+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
3919+ "GL_TEXTURE_HEIGHT\0"
3920+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
3921+ "GL_TEXTURE_INTENSITY_SIZE\0"
3922+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
3923+ "GL_TEXTURE_INTERNAL_FORMAT\0"
3924+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
3925+ "GL_TEXTURE_LOD_BIAS\0"
3926+ "GL_TEXTURE_LOD_BIAS_EXT\0"
3927+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
3928+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
3929+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
3930+ "GL_TEXTURE_LUMINANCE_SIZE\0"
3931+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
3932+ "GL_TEXTURE_MAG_FILTER\0"
3933+ "GL_TEXTURE_MATRIX\0"
3934+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
3935+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
3936+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
3937+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
3938+ "GL_TEXTURE_MAX_LEVEL\0"
3939+ "GL_TEXTURE_MAX_LOD\0"
3940+ "GL_TEXTURE_MIN_FILTER\0"
3941+ "GL_TEXTURE_MIN_LOD\0"
3942+ "GL_TEXTURE_PRIORITY\0"
3943+ "GL_TEXTURE_RECTANGLE_ARB\0"
3944+ "GL_TEXTURE_RECTANGLE_NV\0"
3945+ "GL_TEXTURE_RED_SIZE\0"
3946+ "GL_TEXTURE_RED_SIZE_EXT\0"
3947+ "GL_TEXTURE_RESIDENT\0"
3948+ "GL_TEXTURE_STACK_DEPTH\0"
3949+ "GL_TEXTURE_TOO_LARGE_EXT\0"
3950+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
3951+ "GL_TEXTURE_WIDTH\0"
3952+ "GL_TEXTURE_WRAP_R\0"
3953+ "GL_TEXTURE_WRAP_S\0"
3954+ "GL_TEXTURE_WRAP_T\0"
3955+ "GL_TIME_ELAPSED_EXT\0"
3956+ "GL_TRACK_MATRIX_NV\0"
3957+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
3958+ "GL_TRANSFORM_BIT\0"
3959+ "GL_TRANSPOSE_COLOR_MATRIX\0"
3960+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
3961+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
3962+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
3963+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
3964+ "GL_TRANSPOSE_NV\0"
3965+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
3966+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
3967+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
3968+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
3969+ "GL_TRIANGLES\0"
3970+ "GL_TRIANGLE_FAN\0"
3971+ "GL_TRIANGLE_MESH_SUN\0"
3972+ "GL_TRIANGLE_STRIP\0"
3973+ "GL_TRUE\0"
3974+ "GL_UNPACK_ALIGNMENT\0"
3975+ "GL_UNPACK_IMAGE_HEIGHT\0"
3976+ "GL_UNPACK_LSB_FIRST\0"
3977+ "GL_UNPACK_ROW_LENGTH\0"
3978+ "GL_UNPACK_SKIP_IMAGES\0"
3979+ "GL_UNPACK_SKIP_PIXELS\0"
3980+ "GL_UNPACK_SKIP_ROWS\0"
3981+ "GL_UNPACK_SWAP_BYTES\0"
3982+ "GL_UNSIGNED_BYTE\0"
3983+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
3984+ "GL_UNSIGNED_BYTE_3_3_2\0"
3985+ "GL_UNSIGNED_INT\0"
3986+ "GL_UNSIGNED_INT_10_10_10_2\0"
3987+ "GL_UNSIGNED_INT_24_8_NV\0"
3988+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
3989+ "GL_UNSIGNED_INT_8_8_8_8\0"
3990+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
3991+ "GL_UNSIGNED_SHORT\0"
3992+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
3993+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
3994+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
3995+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
3996+ "GL_UNSIGNED_SHORT_5_6_5\0"
3997+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
3998+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
3999+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
4000+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
4001+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
4002+ "GL_UPPER_LEFT\0"
4003+ "GL_V2F\0"
4004+ "GL_V3F\0"
4005+ "GL_VALIDATE_STATUS\0"
4006+ "GL_VENDOR\0"
4007+ "GL_VERSION\0"
4008+ "GL_VERTEX_ARRAY\0"
4009+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
4010+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
4011+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
4012+ "GL_VERTEX_ARRAY_POINTER\0"
4013+ "GL_VERTEX_ARRAY_SIZE\0"
4014+ "GL_VERTEX_ARRAY_STRIDE\0"
4015+ "GL_VERTEX_ARRAY_TYPE\0"
4016+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
4017+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
4018+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
4019+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
4020+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
4021+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
4022+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
4023+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
4024+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
4025+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
4026+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
4027+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
4028+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
4029+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
4030+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
4031+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
4032+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
4033+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
4034+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
4035+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
4036+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
4037+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
4038+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
4039+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
4040+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
4041+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
4042+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
4043+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
4044+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
4045+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
4046+ "GL_VERTEX_BLEND_ARB\0"
4047+ "GL_VERTEX_PROGRAM_ARB\0"
4048+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
4049+ "GL_VERTEX_PROGRAM_NV\0"
4050+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
4051+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
4052+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
4053+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
4054+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
4055+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
4056+ "GL_VERTEX_SHADER\0"
4057+ "GL_VERTEX_SHADER_ARB\0"
4058+ "GL_VERTEX_STATE_PROGRAM_NV\0"
4059+ "GL_VIEWPORT\0"
4060+ "GL_VIEWPORT_BIT\0"
4061+ "GL_WEIGHT_ARRAY_ARB\0"
4062+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
4063+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
4064+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
4065+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
4066+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
4067+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
4068+ "GL_WEIGHT_SUM_UNITY_ARB\0"
4069+ "GL_WRAP_BORDER_SUN\0"
4070+ "GL_WRITE_ONLY\0"
4071+ "GL_WRITE_ONLY_ARB\0"
4072+ "GL_XOR\0"
4073+ "GL_YCBCR_422_APPLE\0"
4074+ "GL_YCBCR_MESA\0"
4075+ "GL_ZERO\0"
4076+ "GL_ZOOM_X\0"
4077+ "GL_ZOOM_Y\0"
4078+ ;
4079+
4080+static const enum_elt all_enums[1746] =
4081+{
4082+ { 0, 0x00000600 }, /* GL_2D */
4083+ { 6, 0x00001407 }, /* GL_2_BYTES */
4084+ { 17, 0x00000601 }, /* GL_3D */
4085+ { 23, 0x00000602 }, /* GL_3D_COLOR */
4086+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
4087+ { 55, 0x00001408 }, /* GL_3_BYTES */
4088+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
4089+ { 86, 0x00001409 }, /* GL_4_BYTES */
4090+ { 97, 0x00000100 }, /* GL_ACCUM */
4091+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
4092+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
4093+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
4094+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
4095+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
4096+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
4097+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
4098+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
4099+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
4100+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
4101+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
4102+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
4103+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
4104+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
4105+ { 418, 0x00000104 }, /* GL_ADD */
4106+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
4107+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
4108+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
4109+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
4110+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
4111+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
4112+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
4113+ { 576, 0x00001906 }, /* GL_ALPHA */
4114+ { 585, 0x0000803D }, /* GL_ALPHA12 */
4115+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
4116+ { 611, 0x0000803E }, /* GL_ALPHA16 */
4117+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
4118+ { 637, 0x0000803B }, /* GL_ALPHA4 */
4119+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
4120+ { 661, 0x0000803C }, /* GL_ALPHA8 */
4121+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
4122+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
4123+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
4124+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
4125+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
4126+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
4127+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
4128+ { 779, 0x00000207 }, /* GL_ALWAYS */
4129+ { 789, 0x00001200 }, /* GL_AMBIENT */
4130+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
4131+ { 823, 0x00001501 }, /* GL_AND */
4132+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
4133+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
4134+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
4135+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
4136+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
4137+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
4138+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
4139+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
4140+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
4141+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
4142+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
4143+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
4144+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
4145+ { 1107, 0x00000409 }, /* GL_AUX0 */
4146+ { 1115, 0x0000040A }, /* GL_AUX1 */
4147+ { 1123, 0x0000040B }, /* GL_AUX2 */
4148+ { 1131, 0x0000040C }, /* GL_AUX3 */
4149+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
4150+ { 1154, 0x00000405 }, /* GL_BACK */
4151+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
4152+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
4153+ { 1189, 0x000080E0 }, /* GL_BGR */
4154+ { 1196, 0x000080E1 }, /* GL_BGRA */
4155+ { 1204, 0x00001A00 }, /* GL_BITMAP */
4156+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
4157+ { 1230, 0x00000BE2 }, /* GL_BLEND */
4158+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
4159+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
4160+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
4161+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
4162+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
4163+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
4164+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
4165+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
4166+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
4167+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
4168+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
4169+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
4170+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
4171+ { 1489, 0x00001905 }, /* GL_BLUE */
4172+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
4173+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
4174+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
4175+ { 1537, 0x00008B56 }, /* GL_BOOL */
4176+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
4177+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
4178+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
4179+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
4180+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
4181+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
4182+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
4183+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
4184+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
4185+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
4186+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
4187+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
4188+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
4189+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
4190+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
4191+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
4192+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
4193+ { 1841, 0x00001400 }, /* GL_BYTE */
4194+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
4195+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
4196+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
4197+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
4198+ { 1899, 0x00000901 }, /* GL_CCW */
4199+ { 1906, 0x00002900 }, /* GL_CLAMP */
4200+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
4201+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
4202+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
4203+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
4204+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
4205+ { 2020, 0x00001500 }, /* GL_CLEAR */
4206+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
4207+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
4208+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
4209+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
4210+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
4211+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
4212+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
4213+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
4214+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
4215+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
4216+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
4217+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
4218+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
4219+ { 2314, 0x00000A00 }, /* GL_COEFF */
4220+ { 2323, 0x00001800 }, /* GL_COLOR */
4221+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
4222+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
4223+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
4224+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
4225+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
4226+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
4227+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
4228+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
4229+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
4230+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
4231+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
4232+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
4233+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
4234+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
4235+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
4236+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
4237+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
4238+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
4239+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
4240+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
4241+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
4242+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
4243+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
4244+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
4245+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
4246+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
4247+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
4248+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
4249+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
4250+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
4251+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
4252+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
4253+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
4254+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
4255+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
4256+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
4257+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
4258+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
4259+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
4260+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
4261+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
4262+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
4263+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
4264+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
4265+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
4266+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
4267+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
4268+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
4269+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
4270+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
4271+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
4272+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
4273+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
4274+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
4275+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
4276+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
4277+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
4278+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
4279+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
4280+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
4281+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
4282+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
4283+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
4284+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
4285+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
4286+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
4287+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
4288+ { 3988, 0x00008570 }, /* GL_COMBINE */
4289+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
4290+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
4291+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
4292+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
4293+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
4294+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
4295+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
4296+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
4297+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
4298+ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
4299+ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
4300+ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
4301+ { 4241, 0x00001300 }, /* GL_COMPILE */
4302+ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
4303+ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
4304+ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
4305+ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
4306+ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
4307+ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
4308+ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
4309+ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
4310+ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
4311+ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
4312+ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
4313+ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
4314+ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
4315+ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
4316+ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
4317+ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
4318+ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
4319+ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
4320+ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
4321+ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
4322+ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
4323+ { 4805, 0x00008576 }, /* GL_CONSTANT */
4324+ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
4325+ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
4326+ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
4327+ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
4328+ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
4329+ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
4330+ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
4331+ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
4332+ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
4333+ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
4334+ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
4335+ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
4336+ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
4337+ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
4338+ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
4339+ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
4340+ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
4341+ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
4342+ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
4343+ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
4344+ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
4345+ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
4346+ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
4347+ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
4348+ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
4349+ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
4350+ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
4351+ { 5446, 0x00001503 }, /* GL_COPY */
4352+ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
4353+ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
4354+ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
4355+ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
4356+ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
4357+ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
4358+ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
4359+ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
4360+ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
4361+ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
4362+ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
4363+ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
4364+ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
4365+ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
4366+ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
4367+ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
4368+ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
4369+ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
4370+ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
4371+ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
4372+ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
4373+ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
4374+ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
4375+ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
4376+ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
4377+ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
4378+ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
4379+ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
4380+ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
4381+ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
4382+ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
4383+ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
4384+ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
4385+ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
4386+ { 6265, 0x00000900 }, /* GL_CW */
4387+ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
4388+ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
4389+ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
4390+ { 6333, 0x00002101 }, /* GL_DECAL */
4391+ { 6342, 0x00001E03 }, /* GL_DECR */
4392+ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
4393+ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
4394+ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
4395+ { 6397, 0x00001801 }, /* GL_DEPTH */
4396+ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
4397+ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
4398+ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
4399+ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
4400+ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
4401+ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
4402+ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
4403+ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
4404+ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
4405+ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
4406+ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
4407+ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
4408+ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
4409+ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
4410+ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
4411+ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
4412+ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
4413+ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
4414+ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
4415+ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
4416+ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
4417+ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
4418+ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
4419+ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
4420+ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
4421+ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
4422+ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
4423+ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
4424+ { 6998, 0x00001201 }, /* GL_DIFFUSE */
4425+ { 7009, 0x00000BD0 }, /* GL_DITHER */
4426+ { 7019, 0x00000A02 }, /* GL_DOMAIN */
4427+ { 7029, 0x00001100 }, /* GL_DONT_CARE */
4428+ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
4429+ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
4430+ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
4431+ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
4432+ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
4433+ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
4434+ { 7133, 0x0000140A }, /* GL_DOUBLE */
4435+ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
4436+ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
4437+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
4438+ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
4439+ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
4440+ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
4441+ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
4442+ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
4443+ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
4444+ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
4445+ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
4446+ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
4447+ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
4448+ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
4449+ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
4450+ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
4451+ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
4452+ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
4453+ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
4454+ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
4455+ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
4456+ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
4457+ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
4458+ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
4459+ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
4460+ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
4461+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
4462+ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
4463+ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
4464+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
4465+ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
4466+ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
4467+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
4468+ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
4469+ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
4470+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
4471+ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
4472+ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
4473+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
4474+ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
4475+ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
4476+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
4477+ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
4478+ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
4479+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
4480+ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
4481+ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
4482+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
4483+ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
4484+ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
4485+ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
4486+ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
4487+ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
4488+ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
4489+ { 8177, 0x00000306 }, /* GL_DST_COLOR */
4490+ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
4491+ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
4492+ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
4493+ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
4494+ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
4495+ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
4496+ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
4497+ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
4498+ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
4499+ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
4500+ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
4501+ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
4502+ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
4503+ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
4504+ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
4505+ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
4506+ { 8575, 0x00001600 }, /* GL_EMISSION */
4507+ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
4508+ { 8601, 0x00000202 }, /* GL_EQUAL */
4509+ { 8610, 0x00001509 }, /* GL_EQUIV */
4510+ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
4511+ { 8631, 0x00000800 }, /* GL_EXP */
4512+ { 8638, 0x00000801 }, /* GL_EXP2 */
4513+ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
4514+ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
4515+ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
4516+ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
4517+ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
4518+ { 8729, 0x00000000 }, /* GL_FALSE */
4519+ { 8738, 0x00001101 }, /* GL_FASTEST */
4520+ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
4521+ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
4522+ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
4523+ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
4524+ { 8836, 0x00001B02 }, /* GL_FILL */
4525+ { 8844, 0x00001D00 }, /* GL_FLAT */
4526+ { 8852, 0x00001406 }, /* GL_FLOAT */
4527+ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
4528+ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
4529+ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
4530+ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
4531+ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
4532+ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
4533+ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
4534+ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
4535+ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
4536+ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
4537+ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
4538+ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
4539+ { 9053, 0x00000B60 }, /* GL_FOG */
4540+ { 9060, 0x00000080 }, /* GL_FOG_BIT */
4541+ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
4542+ { 9084, 0x00008451 }, /* GL_FOG_COORD */
4543+ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
4544+ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
4545+ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
4546+ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
4547+ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
4548+ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
4549+ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
4550+ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
4551+ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
4552+ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
4553+ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
4554+ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
4555+ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
4556+ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
4557+ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
4558+ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
4559+ { 9524, 0x00000B64 }, /* GL_FOG_END */
4560+ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
4561+ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
4562+ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
4563+ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
4564+ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
4565+ { 9616, 0x00000B63 }, /* GL_FOG_START */
4566+ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
4567+ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
4568+ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
4569+ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
4570+ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
4571+ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
4572+ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
4573+ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
4574+ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
4575+ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
4576+ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
4577+ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
4578+ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
4579+ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
4580+ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
4581+ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
4582+ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
4583+ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
4584+ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
4585+ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
4586+ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
4587+ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
4588+ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
4589+ { 10462, 0x00000404 }, /* GL_FRONT */
4590+ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
4591+ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
4592+ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
4593+ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
4594+ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
4595+ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
4596+ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
4597+ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
4598+ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
4599+ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
4600+ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
4601+ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
4602+ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
4603+ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
4604+ { 10748, 0x00000206 }, /* GL_GEQUAL */
4605+ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
4606+ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
4607+ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
4608+ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
4609+ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
4610+ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
4611+ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
4612+ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
4613+ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
4614+ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
4615+ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
4616+ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
4617+ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
4618+ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
4619+ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
4620+ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
4621+ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
4622+ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
4623+ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
4624+ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
4625+ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
4626+ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
4627+ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
4628+ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
4629+ { 11304, 0x00000204 }, /* GL_GREATER */
4630+ { 11315, 0x00001904 }, /* GL_GREEN */
4631+ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
4632+ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
4633+ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
4634+ { 11367, 0x00008000 }, /* GL_HINT_BIT */
4635+ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
4636+ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
4637+ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
4638+ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
4639+ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
4640+ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
4641+ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
4642+ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
4643+ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
4644+ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
4645+ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
4646+ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
4647+ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
4648+ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
4649+ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
4650+ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
4651+ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
4652+ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
4653+ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
4654+ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
4655+ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
4656+ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
4657+ { 11910, 0x00001E02 }, /* GL_INCR */
4658+ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
4659+ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
4660+ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
4661+ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
4662+ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
4663+ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
4664+ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
4665+ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
4666+ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
4667+ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
4668+ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
4669+ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
4670+ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
4671+ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
4672+ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
4673+ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
4674+ { 12228, 0x00001404 }, /* GL_INT */
4675+ { 12235, 0x00008049 }, /* GL_INTENSITY */
4676+ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
4677+ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
4678+ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
4679+ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
4680+ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
4681+ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
4682+ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
4683+ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
4684+ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
4685+ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
4686+ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
4687+ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
4688+ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
4689+ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
4690+ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
4691+ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
4692+ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
4693+ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
4694+ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
4695+ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
4696+ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
4697+ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
4698+ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
4699+ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
4700+ { 12663, 0x0000150A }, /* GL_INVERT */
4701+ { 12673, 0x00001E00 }, /* GL_KEEP */
4702+ { 12681, 0x00000406 }, /* GL_LEFT */
4703+ { 12689, 0x00000203 }, /* GL_LEQUAL */
4704+ { 12699, 0x00000201 }, /* GL_LESS */
4705+ { 12707, 0x00004000 }, /* GL_LIGHT0 */
4706+ { 12717, 0x00004001 }, /* GL_LIGHT1 */
4707+ { 12727, 0x00004002 }, /* GL_LIGHT2 */
4708+ { 12737, 0x00004003 }, /* GL_LIGHT3 */
4709+ { 12747, 0x00004004 }, /* GL_LIGHT4 */
4710+ { 12757, 0x00004005 }, /* GL_LIGHT5 */
4711+ { 12767, 0x00004006 }, /* GL_LIGHT6 */
4712+ { 12777, 0x00004007 }, /* GL_LIGHT7 */
4713+ { 12787, 0x00000B50 }, /* GL_LIGHTING */
4714+ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
4715+ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
4716+ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
4717+ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
4718+ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
4719+ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
4720+ { 12952, 0x00001B01 }, /* GL_LINE */
4721+ { 12960, 0x00002601 }, /* GL_LINEAR */
4722+ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
4723+ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
4724+ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
4725+ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
4726+ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
4727+ { 13102, 0x00000001 }, /* GL_LINES */
4728+ { 13111, 0x00000004 }, /* GL_LINE_BIT */
4729+ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
4730+ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
4731+ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
4732+ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
4733+ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
4734+ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
4735+ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
4736+ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
4737+ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
4738+ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
4739+ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
4740+ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
4741+ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
4742+ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
4743+ { 13370, 0x00020000 }, /* GL_LIST_BIT */
4744+ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
4745+ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
4746+ { 13409, 0x00000101 }, /* GL_LOAD */
4747+ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
4748+ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
4749+ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
4750+ { 13460, 0x00001909 }, /* GL_LUMINANCE */
4751+ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
4752+ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
4753+ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
4754+ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
4755+ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
4756+ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
4757+ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
4758+ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
4759+ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
4760+ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
4761+ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
4762+ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
4763+ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
4764+ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
4765+ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
4766+ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
4767+ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
4768+ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
4769+ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
4770+ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
4771+ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
4772+ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
4773+ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
4774+ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
4775+ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
4776+ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
4777+ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
4778+ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
4779+ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
4780+ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
4781+ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
4782+ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
4783+ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
4784+ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
4785+ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
4786+ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
4787+ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
4788+ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
4789+ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
4790+ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
4791+ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
4792+ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
4793+ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
4794+ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
4795+ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
4796+ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
4797+ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
4798+ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
4799+ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
4800+ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
4801+ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
4802+ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
4803+ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
4804+ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
4805+ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
4806+ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
4807+ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
4808+ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
4809+ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
4810+ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
4811+ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
4812+ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
4813+ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
4814+ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
4815+ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
4816+ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
4817+ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
4818+ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
4819+ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
4820+ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
4821+ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
4822+ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
4823+ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
4824+ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
4825+ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
4826+ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
4827+ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
4828+ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
4829+ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
4830+ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
4831+ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
4832+ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
4833+ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
4834+ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
4835+ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
4836+ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
4837+ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
4838+ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
4839+ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
4840+ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
4841+ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
4842+ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
4843+ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
4844+ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
4845+ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
4846+ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
4847+ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
4848+ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
4849+ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
4850+ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
4851+ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
4852+ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
4853+ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
4854+ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
4855+ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
4856+ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
4857+ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
4858+ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
4859+ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
4860+ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
4861+ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
4862+ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
4863+ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
4864+ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
4865+ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
4866+ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
4867+ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
4868+ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
4869+ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
4870+ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
4871+ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
4872+ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
4873+ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
4874+ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
4875+ { 16086, 0x00008008 }, /* GL_MAX */
4876+ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
4877+ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
4878+ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
4879+ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
4880+ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
4881+ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
4882+ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
4883+ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
4884+ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
4885+ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
4886+ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
4887+ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
4888+ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
4889+ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
4890+ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
4891+ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
4892+ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
4893+ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
4894+ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
4895+ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
4896+ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
4897+ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
4898+ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
4899+ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
4900+ { 16766, 0x00008008 }, /* GL_MAX_EXT */
4901+ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
4902+ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
4903+ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
4904+ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
4905+ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
4906+ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
4907+ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
4908+ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
4909+ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
4910+ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
4911+ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
4912+ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
4913+ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
4914+ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
4915+ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
4916+ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
4917+ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
4918+ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
4919+ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
4920+ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
4921+ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
4922+ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
4923+ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4924+ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4925+ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
4926+ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4927+ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
4928+ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
4929+ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4930+ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4931+ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
4932+ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
4933+ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
4934+ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
4935+ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
4936+ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
4937+ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
4938+ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
4939+ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
4940+ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
4941+ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
4942+ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
4943+ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
4944+ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
4945+ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
4946+ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
4947+ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
4948+ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
4949+ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
4950+ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
4951+ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
4952+ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
4953+ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
4954+ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
4955+ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
4956+ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
4957+ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
4958+ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
4959+ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
4960+ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
4961+ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
4962+ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
4963+ { 18669, 0x00008007 }, /* GL_MIN */
4964+ { 18676, 0x0000802E }, /* GL_MINMAX */
4965+ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
4966+ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
4967+ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
4968+ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
4969+ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
4970+ { 18772, 0x00008007 }, /* GL_MIN_EXT */
4971+ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
4972+ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
4973+ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
4974+ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
4975+ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
4976+ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
4977+ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
4978+ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
4979+ { 18974, 0x00001700 }, /* GL_MODELVIEW */
4980+ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
4981+ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
4982+ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
4983+ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
4984+ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
4985+ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
4986+ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
4987+ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
4988+ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
4989+ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
4990+ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
4991+ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
4992+ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
4993+ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
4994+ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
4995+ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
4996+ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
4997+ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
4998+ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
4999+ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
5000+ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
5001+ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
5002+ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
5003+ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
5004+ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
5005+ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
5006+ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
5007+ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
5008+ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
5009+ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
5010+ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
5011+ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
5012+ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
5013+ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
5014+ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
5015+ { 19657, 0x00002100 }, /* GL_MODULATE */
5016+ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
5017+ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
5018+ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
5019+ { 19741, 0x00000103 }, /* GL_MULT */
5020+ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
5021+ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
5022+ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
5023+ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
5024+ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
5025+ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
5026+ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
5027+ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
5028+ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
5029+ { 19930, 0x0000150E }, /* GL_NAND */
5030+ { 19938, 0x00002600 }, /* GL_NEAREST */
5031+ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
5032+ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
5033+ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
5034+ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
5035+ { 20063, 0x00000200 }, /* GL_NEVER */
5036+ { 20072, 0x00001102 }, /* GL_NICEST */
5037+ { 20082, 0x00000000 }, /* GL_NONE */
5038+ { 20090, 0x00001505 }, /* GL_NOOP */
5039+ { 20098, 0x00001508 }, /* GL_NOR */
5040+ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
5041+ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
5042+ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
5043+ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
5044+ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
5045+ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
5046+ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
5047+ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
5048+ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
5049+ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
5050+ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
5051+ { 20329, 0x00000000 }, /* GL_NO_ERROR */
5052+ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
5053+ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
5054+ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
5055+ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
5056+ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
5057+ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
5058+ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
5059+ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
5060+ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
5061+ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
5062+ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
5063+ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
5064+ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
5065+ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
5066+ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
5067+ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
5068+ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
5069+ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
5070+ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
5071+ { 20889, 0x00000001 }, /* GL_ONE */
5072+ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
5073+ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
5074+ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
5075+ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
5076+ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
5077+ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
5078+ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
5079+ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
5080+ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
5081+ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
5082+ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
5083+ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
5084+ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
5085+ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
5086+ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
5087+ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
5088+ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
5089+ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
5090+ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
5091+ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
5092+ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
5093+ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
5094+ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
5095+ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
5096+ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
5097+ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
5098+ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
5099+ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
5100+ { 21502, 0x00001507 }, /* GL_OR */
5101+ { 21508, 0x00000A01 }, /* GL_ORDER */
5102+ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
5103+ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
5104+ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
5105+ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
5106+ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
5107+ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
5108+ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
5109+ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
5110+ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
5111+ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
5112+ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
5113+ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
5114+ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
5115+ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
5116+ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
5117+ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
5118+ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
5119+ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
5120+ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
5121+ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
5122+ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
5123+ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
5124+ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
5125+ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
5126+ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
5127+ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5128+ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
5129+ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5130+ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
5131+ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5132+ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
5133+ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5134+ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
5135+ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5136+ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
5137+ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5138+ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
5139+ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5140+ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
5141+ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5142+ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
5143+ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5144+ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
5145+ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5146+ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
5147+ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
5148+ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
5149+ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
5150+ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
5151+ { 22605, 0x00001B00 }, /* GL_POINT */
5152+ { 22614, 0x00000000 }, /* GL_POINTS */
5153+ { 22624, 0x00000002 }, /* GL_POINT_BIT */
5154+ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
5155+ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
5156+ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
5157+ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
5158+ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
5159+ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
5160+ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
5161+ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
5162+ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
5163+ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
5164+ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
5165+ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
5166+ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
5167+ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
5168+ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
5169+ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
5170+ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
5171+ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
5172+ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
5173+ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
5174+ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
5175+ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
5176+ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
5177+ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
5178+ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
5179+ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
5180+ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
5181+ { 23291, 0x00000009 }, /* GL_POLYGON */
5182+ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
5183+ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
5184+ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
5185+ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
5186+ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
5187+ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
5188+ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
5189+ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
5190+ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
5191+ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
5192+ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
5193+ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
5194+ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
5195+ { 23575, 0x00001203 }, /* GL_POSITION */
5196+ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
5197+ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
5198+ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
5199+ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
5200+ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
5201+ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
5202+ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
5203+ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
5204+ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
5205+ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
5206+ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
5207+ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
5208+ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
5209+ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
5210+ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
5211+ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
5212+ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
5213+ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
5214+ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
5215+ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
5216+ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
5217+ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
5218+ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
5219+ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
5220+ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
5221+ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
5222+ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
5223+ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
5224+ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
5225+ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
5226+ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
5227+ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
5228+ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
5229+ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
5230+ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
5231+ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
5232+ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
5233+ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
5234+ { 24862, 0x00008578 }, /* GL_PREVIOUS */
5235+ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
5236+ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
5237+ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
5238+ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
5239+ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
5240+ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
5241+ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
5242+ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
5243+ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
5244+ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
5245+ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
5246+ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
5247+ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
5248+ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
5249+ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
5250+ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
5251+ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
5252+ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
5253+ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
5254+ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
5255+ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
5256+ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
5257+ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
5258+ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
5259+ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
5260+ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
5261+ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
5262+ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
5263+ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
5264+ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
5265+ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
5266+ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
5267+ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
5268+ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
5269+ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
5270+ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
5271+ { 25858, 0x00001701 }, /* GL_PROJECTION */
5272+ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
5273+ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
5274+ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
5275+ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
5276+ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
5277+ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
5278+ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
5279+ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
5280+ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
5281+ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
5282+ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
5283+ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
5284+ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
5285+ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
5286+ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
5287+ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
5288+ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
5289+ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
5290+ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
5291+ { 26377, 0x00002003 }, /* GL_Q */
5292+ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
5293+ { 26407, 0x00000007 }, /* GL_QUADS */
5294+ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
5295+ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
5296+ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
5297+ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
5298+ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
5299+ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
5300+ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
5301+ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
5302+ { 26587, 0x00002002 }, /* GL_R */
5303+ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
5304+ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
5305+ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
5306+ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
5307+ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
5308+ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
5309+ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
5310+ { 26738, 0x000088BA }, /* GL_READ_WRITE */
5311+ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
5312+ { 26770, 0x00001903 }, /* GL_RED */
5313+ { 26777, 0x00008016 }, /* GL_REDUCE */
5314+ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
5315+ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
5316+ { 26813, 0x00000D52 }, /* GL_RED_BITS */
5317+ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
5318+ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
5319+ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
5320+ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
5321+ { 26899, 0x00001C00 }, /* GL_RENDER */
5322+ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
5323+ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
5324+ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
5325+ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
5326+ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
5327+ { 27046, 0x00001F01 }, /* GL_RENDERER */
5328+ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
5329+ { 27073, 0x00002901 }, /* GL_REPEAT */
5330+ { 27083, 0x00001E01 }, /* GL_REPLACE */
5331+ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
5332+ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
5333+ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
5334+ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
5335+ { 27172, 0x00000102 }, /* GL_RETURN */
5336+ { 27182, 0x00001907 }, /* GL_RGB */
5337+ { 27189, 0x00008052 }, /* GL_RGB10 */
5338+ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
5339+ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
5340+ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
5341+ { 27239, 0x00008053 }, /* GL_RGB12 */
5342+ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
5343+ { 27261, 0x00008054 }, /* GL_RGB16 */
5344+ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
5345+ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
5346+ { 27295, 0x0000804F }, /* GL_RGB4 */
5347+ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
5348+ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
5349+ { 27328, 0x00008050 }, /* GL_RGB5 */
5350+ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
5351+ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
5352+ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
5353+ { 27374, 0x00008051 }, /* GL_RGB8 */
5354+ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
5355+ { 27394, 0x00001908 }, /* GL_RGBA */
5356+ { 27402, 0x0000805A }, /* GL_RGBA12 */
5357+ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
5358+ { 27426, 0x0000805B }, /* GL_RGBA16 */
5359+ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
5360+ { 27450, 0x00008055 }, /* GL_RGBA2 */
5361+ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
5362+ { 27472, 0x00008056 }, /* GL_RGBA4 */
5363+ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
5364+ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
5365+ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
5366+ { 27527, 0x00008058 }, /* GL_RGBA8 */
5367+ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
5368+ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
5369+ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
5370+ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
5371+ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
5372+ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
5373+ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
5374+ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
5375+ { 27652, 0x00000407 }, /* GL_RIGHT */
5376+ { 27661, 0x00002000 }, /* GL_S */
5377+ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
5378+ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
5379+ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
5380+ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
5381+ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
5382+ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
5383+ { 27766, 0x000080A9 }, /* GL_SAMPLES */
5384+ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
5385+ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
5386+ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
5387+ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
5388+ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
5389+ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
5390+ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
5391+ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
5392+ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
5393+ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
5394+ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
5395+ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
5396+ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
5397+ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
5398+ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
5399+ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
5400+ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
5401+ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
5402+ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
5403+ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
5404+ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
5405+ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
5406+ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
5407+ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
5408+ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
5409+ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
5410+ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
5411+ { 28453, 0x00001C02 }, /* GL_SELECT */
5412+ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
5413+ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
5414+ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
5415+ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
5416+ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
5417+ { 28590, 0x0000150F }, /* GL_SET */
5418+ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
5419+ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
5420+ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
5421+ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
5422+ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
5423+ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
5424+ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
5425+ { 28753, 0x00001601 }, /* GL_SHININESS */
5426+ { 28766, 0x00001402 }, /* GL_SHORT */
5427+ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
5428+ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
5429+ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
5430+ { 28830, 0x00001D01 }, /* GL_SMOOTH */
5431+ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
5432+ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
5433+ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
5434+ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
5435+ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
5436+ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
5437+ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
5438+ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
5439+ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
5440+ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
5441+ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
5442+ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
5443+ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
5444+ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
5445+ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
5446+ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
5447+ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
5448+ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
5449+ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
5450+ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
5451+ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
5452+ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
5453+ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
5454+ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
5455+ { 29334, 0x00001202 }, /* GL_SPECULAR */
5456+ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
5457+ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
5458+ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
5459+ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
5460+ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
5461+ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
5462+ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
5463+ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
5464+ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
5465+ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
5466+ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
5467+ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
5468+ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
5469+ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
5470+ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
5471+ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
5472+ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
5473+ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
5474+ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
5475+ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
5476+ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
5477+ { 29675, 0x00001802 }, /* GL_STENCIL */
5478+ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
5479+ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
5480+ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
5481+ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
5482+ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
5483+ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
5484+ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
5485+ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
5486+ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
5487+ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
5488+ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
5489+ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
5490+ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
5491+ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
5492+ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
5493+ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
5494+ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
5495+ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
5496+ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
5497+ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
5498+ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
5499+ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
5500+ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
5501+ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
5502+ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
5503+ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
5504+ { 30268, 0x00000C33 }, /* GL_STEREO */
5505+ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
5506+ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
5507+ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
5508+ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
5509+ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
5510+ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
5511+ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
5512+ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
5513+ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
5514+ { 30425, 0x00002001 }, /* GL_T */
5515+ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
5516+ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
5517+ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
5518+ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
5519+ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
5520+ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
5521+ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
5522+ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
5523+ { 30559, 0x00001702 }, /* GL_TEXTURE */
5524+ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
5525+ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
5526+ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
5527+ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
5528+ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
5529+ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
5530+ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
5531+ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
5532+ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
5533+ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
5534+ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
5535+ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
5536+ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
5537+ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
5538+ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
5539+ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
5540+ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
5541+ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
5542+ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
5543+ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
5544+ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
5545+ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
5546+ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
5547+ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
5548+ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
5549+ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
5550+ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
5551+ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
5552+ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
5553+ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
5554+ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
5555+ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
5556+ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
5557+ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
5558+ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
5559+ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
5560+ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
5561+ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
5562+ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
5563+ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
5564+ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
5565+ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
5566+ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
5567+ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
5568+ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
5569+ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
5570+ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
5571+ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
5572+ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
5573+ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
5574+ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
5575+ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
5576+ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
5577+ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
5578+ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
5579+ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
5580+ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
5581+ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
5582+ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
5583+ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
5584+ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
5585+ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
5586+ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
5587+ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
5588+ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
5589+ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
5590+ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
5591+ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
5592+ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
5593+ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
5594+ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
5595+ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
5596+ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
5597+ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
5598+ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
5599+ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
5600+ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
5601+ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
5602+ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
5603+ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
5604+ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
5605+ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
5606+ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
5607+ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
5608+ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
5609+ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
5610+ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5611+ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5612+ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5613+ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5614+ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5615+ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5616+ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
5617+ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5618+ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5619+ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
5620+ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
5621+ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
5622+ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
5623+ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5624+ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
5625+ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
5626+ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
5627+ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
5628+ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
5629+ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
5630+ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
5631+ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
5632+ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
5633+ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
5634+ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
5635+ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
5636+ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5637+ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5638+ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5639+ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5640+ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
5641+ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
5642+ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
5643+ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
5644+ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
5645+ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
5646+ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
5647+ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
5648+ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
5649+ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
5650+ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
5651+ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
5652+ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
5653+ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
5654+ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
5655+ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
5656+ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
5657+ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
5658+ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
5659+ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
5660+ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
5661+ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
5662+ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
5663+ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
5664+ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
5665+ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
5666+ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
5667+ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
5668+ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
5669+ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
5670+ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
5671+ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
5672+ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
5673+ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
5674+ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
5675+ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
5676+ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
5677+ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5678+ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5679+ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5680+ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
5681+ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
5682+ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
5683+ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
5684+ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
5685+ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5686+ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5687+ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5688+ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
5689+ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
5690+ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
5691+ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
5692+ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
5693+ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
5694+ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
5695+ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
5696+ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
5697+ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
5698+ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
5699+ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
5700+ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
5701+ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
5702+ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
5703+ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
5704+ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
5705+ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
5706+ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
5707+ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
5708+ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
5709+ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
5710+ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
5711+ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
5712+ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
5713+ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
5714+ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
5715+ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
5716+ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
5717+ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
5718+ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
5719+ { 34912, 0x00000004 }, /* GL_TRIANGLES */
5720+ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
5721+ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
5722+ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
5723+ { 34980, 0x00000001 }, /* GL_TRUE */
5724+ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
5725+ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
5726+ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
5727+ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
5728+ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
5729+ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
5730+ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
5731+ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
5732+ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
5733+ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5734+ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
5735+ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
5736+ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
5737+ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
5738+ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5739+ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
5740+ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5741+ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
5742+ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5743+ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5744+ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5745+ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5746+ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
5747+ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5748+ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
5749+ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
5750+ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
5751+ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
5752+ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
5753+ { 35688, 0x00002A20 }, /* GL_V2F */
5754+ { 35695, 0x00002A21 }, /* GL_V3F */
5755+ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
5756+ { 35721, 0x00001F00 }, /* GL_VENDOR */
5757+ { 35731, 0x00001F02 }, /* GL_VERSION */
5758+ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
5759+ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
5760+ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
5761+ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
5762+ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
5763+ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
5764+ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
5765+ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
5766+ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
5767+ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
5768+ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
5769+ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
5770+ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
5771+ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
5772+ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
5773+ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
5774+ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
5775+ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
5776+ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
5777+ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
5778+ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
5779+ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
5780+ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
5781+ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
5782+ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
5783+ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
5784+ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
5785+ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
5786+ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
5787+ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
5788+ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
5789+ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
5790+ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
5791+ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
5792+ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
5793+ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
5794+ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
5795+ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
5796+ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
5797+ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
5798+ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
5799+ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
5800+ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
5801+ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
5802+ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
5803+ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
5804+ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
5805+ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
5806+ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
5807+ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
5808+ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
5809+ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
5810+ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
5811+ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
5812+ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
5813+ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
5814+ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
5815+ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
5816+ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
5817+ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
5818+ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
5819+ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
5820+ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
5821+ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
5822+ { 37482, 0x00001506 }, /* GL_XOR */
5823+ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
5824+ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
5825+ { 37522, 0x00000000 }, /* GL_ZERO */
5826+ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
5827+ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
5828+};
5829+
5830+static const unsigned reduced_enums[1284] =
5831+{
5832+ 436, /* GL_FALSE */
5833+ 645, /* GL_LINES */
5834+ 647, /* GL_LINE_LOOP */
5835+ 654, /* GL_LINE_STRIP */
5836+ 1637, /* GL_TRIANGLES */
5837+ 1640, /* GL_TRIANGLE_STRIP */
5838+ 1638, /* GL_TRIANGLE_FAN */
5839+ 1211, /* GL_QUADS */
5840+ 1213, /* GL_QUAD_STRIP */
5841+ 1099, /* GL_POLYGON */
5842+ 1111, /* GL_POLYGON_STIPPLE_BIT */
5843+ 1064, /* GL_PIXEL_MODE_BIT */
5844+ 632, /* GL_LIGHTING_BIT */
5845+ 458, /* GL_FOG_BIT */
5846+ 8, /* GL_ACCUM */
5847+ 664, /* GL_LOAD */
5848+ 1253, /* GL_RETURN */
5849+ 937, /* GL_MULT */
5850+ 23, /* GL_ADD */
5851+ 953, /* GL_NEVER */
5852+ 622, /* GL_LESS */
5853+ 426, /* GL_EQUAL */
5854+ 621, /* GL_LEQUAL */
5855+ 547, /* GL_GREATER */
5856+ 968, /* GL_NOTEQUAL */
5857+ 522, /* GL_GEQUAL */
5858+ 46, /* GL_ALWAYS */
5859+ 1386, /* GL_SRC_COLOR */
5860+ 997, /* GL_ONE_MINUS_SRC_COLOR */
5861+ 1384, /* GL_SRC_ALPHA */
5862+ 996, /* GL_ONE_MINUS_SRC_ALPHA */
5863+ 406, /* GL_DST_ALPHA */
5864+ 994, /* GL_ONE_MINUS_DST_ALPHA */
5865+ 407, /* GL_DST_COLOR */
5866+ 995, /* GL_ONE_MINUS_DST_COLOR */
5867+ 1385, /* GL_SRC_ALPHA_SATURATE */
5868+ 510, /* GL_FRONT_LEFT */
5869+ 511, /* GL_FRONT_RIGHT */
5870+ 69, /* GL_BACK_LEFT */
5871+ 70, /* GL_BACK_RIGHT */
5872+ 507, /* GL_FRONT */
5873+ 68, /* GL_BACK */
5874+ 620, /* GL_LEFT */
5875+ 1293, /* GL_RIGHT */
5876+ 508, /* GL_FRONT_AND_BACK */
5877+ 63, /* GL_AUX0 */
5878+ 64, /* GL_AUX1 */
5879+ 65, /* GL_AUX2 */
5880+ 66, /* GL_AUX3 */
5881+ 612, /* GL_INVALID_ENUM */
5882+ 615, /* GL_INVALID_VALUE */
5883+ 614, /* GL_INVALID_OPERATION */
5884+ 1387, /* GL_STACK_OVERFLOW */
5885+ 1388, /* GL_STACK_UNDERFLOW */
5886+ 1022, /* GL_OUT_OF_MEMORY */
5887+ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
5888+ 0, /* GL_2D */
5889+ 2, /* GL_3D */
5890+ 3, /* GL_3D_COLOR */
5891+ 4, /* GL_3D_COLOR_TEXTURE */
5892+ 6, /* GL_4D_COLOR_TEXTURE */
5893+ 1042, /* GL_PASS_THROUGH_TOKEN */
5894+ 1098, /* GL_POINT_TOKEN */
5895+ 655, /* GL_LINE_TOKEN */
5896+ 1112, /* GL_POLYGON_TOKEN */
5897+ 74, /* GL_BITMAP_TOKEN */
5898+ 405, /* GL_DRAW_PIXEL_TOKEN */
5899+ 271, /* GL_COPY_PIXEL_TOKEN */
5900+ 648, /* GL_LINE_RESET_TOKEN */
5901+ 429, /* GL_EXP */
5902+ 430, /* GL_EXP2 */
5903+ 304, /* GL_CW */
5904+ 116, /* GL_CCW */
5905+ 137, /* GL_COEFF */
5906+ 1019, /* GL_ORDER */
5907+ 344, /* GL_DOMAIN */
5908+ 279, /* GL_CURRENT_COLOR */
5909+ 282, /* GL_CURRENT_INDEX */
5910+ 288, /* GL_CURRENT_NORMAL */
5911+ 300, /* GL_CURRENT_TEXTURE_COORDS */
5912+ 293, /* GL_CURRENT_RASTER_COLOR */
5913+ 295, /* GL_CURRENT_RASTER_INDEX */
5914+ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
5915+ 296, /* GL_CURRENT_RASTER_POSITION */
5916+ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
5917+ 294, /* GL_CURRENT_RASTER_DISTANCE */
5918+ 1091, /* GL_POINT_SMOOTH */
5919+ 1080, /* GL_POINT_SIZE */
5920+ 1090, /* GL_POINT_SIZE_RANGE */
5921+ 1081, /* GL_POINT_SIZE_GRANULARITY */
5922+ 649, /* GL_LINE_SMOOTH */
5923+ 656, /* GL_LINE_WIDTH */
5924+ 658, /* GL_LINE_WIDTH_RANGE */
5925+ 657, /* GL_LINE_WIDTH_GRANULARITY */
5926+ 651, /* GL_LINE_STIPPLE */
5927+ 652, /* GL_LINE_STIPPLE_PATTERN */
5928+ 653, /* GL_LINE_STIPPLE_REPEAT */
5929+ 663, /* GL_LIST_MODE */
5930+ 822, /* GL_MAX_LIST_NESTING */
5931+ 660, /* GL_LIST_BASE */
5932+ 662, /* GL_LIST_INDEX */
5933+ 1101, /* GL_POLYGON_MODE */
5934+ 1108, /* GL_POLYGON_SMOOTH */
5935+ 1110, /* GL_POLYGON_STIPPLE */
5936+ 414, /* GL_EDGE_FLAG */
5937+ 272, /* GL_CULL_FACE */
5938+ 273, /* GL_CULL_FACE_MODE */
5939+ 509, /* GL_FRONT_FACE */
5940+ 631, /* GL_LIGHTING */
5941+ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
5942+ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
5943+ 633, /* GL_LIGHT_MODEL_AMBIENT */
5944+ 1339, /* GL_SHADE_MODEL */
5945+ 168, /* GL_COLOR_MATERIAL_FACE */
5946+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
5947+ 167, /* GL_COLOR_MATERIAL */
5948+ 457, /* GL_FOG */
5949+ 479, /* GL_FOG_INDEX */
5950+ 475, /* GL_FOG_DENSITY */
5951+ 483, /* GL_FOG_START */
5952+ 477, /* GL_FOG_END */
5953+ 480, /* GL_FOG_MODE */
5954+ 459, /* GL_FOG_COLOR */
5955+ 333, /* GL_DEPTH_RANGE */
5956+ 338, /* GL_DEPTH_TEST */
5957+ 341, /* GL_DEPTH_WRITEMASK */
5958+ 321, /* GL_DEPTH_CLEAR_VALUE */
5959+ 332, /* GL_DEPTH_FUNC */
5960+ 12, /* GL_ACCUM_CLEAR_VALUE */
5961+ 1418, /* GL_STENCIL_TEST */
5962+ 1406, /* GL_STENCIL_CLEAR_VALUE */
5963+ 1408, /* GL_STENCIL_FUNC */
5964+ 1420, /* GL_STENCIL_VALUE_MASK */
5965+ 1407, /* GL_STENCIL_FAIL */
5966+ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
5967+ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
5968+ 1417, /* GL_STENCIL_REF */
5969+ 1421, /* GL_STENCIL_WRITEMASK */
5970+ 791, /* GL_MATRIX_MODE */
5971+ 958, /* GL_NORMALIZE */
5972+ 1727, /* GL_VIEWPORT */
5973+ 932, /* GL_MODELVIEW_STACK_DEPTH */
5974+ 1191, /* GL_PROJECTION_STACK_DEPTH */
5975+ 1616, /* GL_TEXTURE_STACK_DEPTH */
5976+ 930, /* GL_MODELVIEW_MATRIX */
5977+ 1190, /* GL_PROJECTION_MATRIX */
5978+ 1601, /* GL_TEXTURE_MATRIX */
5979+ 61, /* GL_ATTRIB_STACK_DEPTH */
5980+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
5981+ 43, /* GL_ALPHA_TEST */
5982+ 44, /* GL_ALPHA_TEST_FUNC */
5983+ 45, /* GL_ALPHA_TEST_REF */
5984+ 343, /* GL_DITHER */
5985+ 78, /* GL_BLEND_DST */
5986+ 86, /* GL_BLEND_SRC */
5987+ 75, /* GL_BLEND */
5988+ 666, /* GL_LOGIC_OP_MODE */
5989+ 586, /* GL_INDEX_LOGIC_OP */
5990+ 166, /* GL_COLOR_LOGIC_OP */
5991+ 67, /* GL_AUX_BUFFERS */
5992+ 354, /* GL_DRAW_BUFFER */
5993+ 1223, /* GL_READ_BUFFER */
5994+ 1320, /* GL_SCISSOR_BOX */
5995+ 1321, /* GL_SCISSOR_TEST */
5996+ 585, /* GL_INDEX_CLEAR_VALUE */
5997+ 590, /* GL_INDEX_WRITEMASK */
5998+ 163, /* GL_COLOR_CLEAR_VALUE */
5999+ 205, /* GL_COLOR_WRITEMASK */
6000+ 587, /* GL_INDEX_MODE */
6001+ 1287, /* GL_RGBA_MODE */
6002+ 353, /* GL_DOUBLEBUFFER */
6003+ 1422, /* GL_STEREO */
6004+ 1246, /* GL_RENDER_MODE */
6005+ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
6006+ 1092, /* GL_POINT_SMOOTH_HINT */
6007+ 650, /* GL_LINE_SMOOTH_HINT */
6008+ 1109, /* GL_POLYGON_SMOOTH_HINT */
6009+ 478, /* GL_FOG_HINT */
6010+ 1582, /* GL_TEXTURE_GEN_S */
6011+ 1583, /* GL_TEXTURE_GEN_T */
6012+ 1581, /* GL_TEXTURE_GEN_R */
6013+ 1580, /* GL_TEXTURE_GEN_Q */
6014+ 1056, /* GL_PIXEL_MAP_I_TO_I */
6015+ 1062, /* GL_PIXEL_MAP_S_TO_S */
6016+ 1058, /* GL_PIXEL_MAP_I_TO_R */
6017+ 1054, /* GL_PIXEL_MAP_I_TO_G */
6018+ 1052, /* GL_PIXEL_MAP_I_TO_B */
6019+ 1050, /* GL_PIXEL_MAP_I_TO_A */
6020+ 1060, /* GL_PIXEL_MAP_R_TO_R */
6021+ 1048, /* GL_PIXEL_MAP_G_TO_G */
6022+ 1046, /* GL_PIXEL_MAP_B_TO_B */
6023+ 1044, /* GL_PIXEL_MAP_A_TO_A */
6024+ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
6025+ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
6026+ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
6027+ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
6028+ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
6029+ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
6030+ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
6031+ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
6032+ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
6033+ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
6034+ 1649, /* GL_UNPACK_SWAP_BYTES */
6035+ 1644, /* GL_UNPACK_LSB_FIRST */
6036+ 1645, /* GL_UNPACK_ROW_LENGTH */
6037+ 1648, /* GL_UNPACK_SKIP_ROWS */
6038+ 1647, /* GL_UNPACK_SKIP_PIXELS */
6039+ 1642, /* GL_UNPACK_ALIGNMENT */
6040+ 1031, /* GL_PACK_SWAP_BYTES */
6041+ 1026, /* GL_PACK_LSB_FIRST */
6042+ 1027, /* GL_PACK_ROW_LENGTH */
6043+ 1030, /* GL_PACK_SKIP_ROWS */
6044+ 1029, /* GL_PACK_SKIP_PIXELS */
6045+ 1023, /* GL_PACK_ALIGNMENT */
6046+ 744, /* GL_MAP_COLOR */
6047+ 745, /* GL_MAP_STENCIL */
6048+ 589, /* GL_INDEX_SHIFT */
6049+ 588, /* GL_INDEX_OFFSET */
6050+ 1235, /* GL_RED_SCALE */
6051+ 1233, /* GL_RED_BIAS */
6052+ 1744, /* GL_ZOOM_X */
6053+ 1745, /* GL_ZOOM_Y */
6054+ 551, /* GL_GREEN_SCALE */
6055+ 549, /* GL_GREEN_BIAS */
6056+ 92, /* GL_BLUE_SCALE */
6057+ 90, /* GL_BLUE_BIAS */
6058+ 42, /* GL_ALPHA_SCALE */
6059+ 40, /* GL_ALPHA_BIAS */
6060+ 334, /* GL_DEPTH_SCALE */
6061+ 315, /* GL_DEPTH_BIAS */
6062+ 817, /* GL_MAX_EVAL_ORDER */
6063+ 821, /* GL_MAX_LIGHTS */
6064+ 800, /* GL_MAX_CLIP_PLANES */
6065+ 865, /* GL_MAX_TEXTURE_SIZE */
6066+ 827, /* GL_MAX_PIXEL_MAP_TABLE */
6067+ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
6068+ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
6069+ 825, /* GL_MAX_NAME_STACK_DEPTH */
6070+ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
6071+ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
6072+ 880, /* GL_MAX_VIEWPORT_DIMS */
6073+ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
6074+ 1429, /* GL_SUBPIXEL_BITS */
6075+ 584, /* GL_INDEX_BITS */
6076+ 1234, /* GL_RED_BITS */
6077+ 550, /* GL_GREEN_BITS */
6078+ 91, /* GL_BLUE_BITS */
6079+ 41, /* GL_ALPHA_BITS */
6080+ 316, /* GL_DEPTH_BITS */
6081+ 1404, /* GL_STENCIL_BITS */
6082+ 14, /* GL_ACCUM_RED_BITS */
6083+ 13, /* GL_ACCUM_GREEN_BITS */
6084+ 10, /* GL_ACCUM_BLUE_BITS */
6085+ 9, /* GL_ACCUM_ALPHA_BITS */
6086+ 946, /* GL_NAME_STACK_DEPTH */
6087+ 62, /* GL_AUTO_NORMAL */
6088+ 690, /* GL_MAP1_COLOR_4 */
6089+ 693, /* GL_MAP1_INDEX */
6090+ 694, /* GL_MAP1_NORMAL */
6091+ 695, /* GL_MAP1_TEXTURE_COORD_1 */
6092+ 696, /* GL_MAP1_TEXTURE_COORD_2 */
6093+ 697, /* GL_MAP1_TEXTURE_COORD_3 */
6094+ 698, /* GL_MAP1_TEXTURE_COORD_4 */
6095+ 699, /* GL_MAP1_VERTEX_3 */
6096+ 700, /* GL_MAP1_VERTEX_4 */
6097+ 717, /* GL_MAP2_COLOR_4 */
6098+ 720, /* GL_MAP2_INDEX */
6099+ 721, /* GL_MAP2_NORMAL */
6100+ 722, /* GL_MAP2_TEXTURE_COORD_1 */
6101+ 723, /* GL_MAP2_TEXTURE_COORD_2 */
6102+ 724, /* GL_MAP2_TEXTURE_COORD_3 */
6103+ 725, /* GL_MAP2_TEXTURE_COORD_4 */
6104+ 726, /* GL_MAP2_VERTEX_3 */
6105+ 727, /* GL_MAP2_VERTEX_4 */
6106+ 691, /* GL_MAP1_GRID_DOMAIN */
6107+ 692, /* GL_MAP1_GRID_SEGMENTS */
6108+ 718, /* GL_MAP2_GRID_DOMAIN */
6109+ 719, /* GL_MAP2_GRID_SEGMENTS */
6110+ 1506, /* GL_TEXTURE_1D */
6111+ 1508, /* GL_TEXTURE_2D */
6112+ 439, /* GL_FEEDBACK_BUFFER_POINTER */
6113+ 440, /* GL_FEEDBACK_BUFFER_SIZE */
6114+ 441, /* GL_FEEDBACK_BUFFER_TYPE */
6115+ 1330, /* GL_SELECTION_BUFFER_POINTER */
6116+ 1331, /* GL_SELECTION_BUFFER_SIZE */
6117+ 1619, /* GL_TEXTURE_WIDTH */
6118+ 1587, /* GL_TEXTURE_HEIGHT */
6119+ 1543, /* GL_TEXTURE_COMPONENTS */
6120+ 1527, /* GL_TEXTURE_BORDER_COLOR */
6121+ 1526, /* GL_TEXTURE_BORDER */
6122+ 345, /* GL_DONT_CARE */
6123+ 437, /* GL_FASTEST */
6124+ 954, /* GL_NICEST */
6125+ 47, /* GL_AMBIENT */
6126+ 342, /* GL_DIFFUSE */
6127+ 1373, /* GL_SPECULAR */
6128+ 1113, /* GL_POSITION */
6129+ 1376, /* GL_SPOT_DIRECTION */
6130+ 1377, /* GL_SPOT_EXPONENT */
6131+ 1375, /* GL_SPOT_CUTOFF */
6132+ 245, /* GL_CONSTANT_ATTENUATION */
6133+ 640, /* GL_LINEAR_ATTENUATION */
6134+ 1210, /* GL_QUADRATIC_ATTENUATION */
6135+ 219, /* GL_COMPILE */
6136+ 220, /* GL_COMPILE_AND_EXECUTE */
6137+ 111, /* GL_BYTE */
6138+ 1650, /* GL_UNSIGNED_BYTE */
6139+ 1344, /* GL_SHORT */
6140+ 1659, /* GL_UNSIGNED_SHORT */
6141+ 592, /* GL_INT */
6142+ 1653, /* GL_UNSIGNED_INT */
6143+ 444, /* GL_FLOAT */
6144+ 1, /* GL_2_BYTES */
6145+ 5, /* GL_3_BYTES */
6146+ 7, /* GL_4_BYTES */
6147+ 352, /* GL_DOUBLE */
6148+ 123, /* GL_CLEAR */
6149+ 49, /* GL_AND */
6150+ 51, /* GL_AND_REVERSE */
6151+ 269, /* GL_COPY */
6152+ 50, /* GL_AND_INVERTED */
6153+ 956, /* GL_NOOP */
6154+ 1740, /* GL_XOR */
6155+ 1018, /* GL_OR */
6156+ 957, /* GL_NOR */
6157+ 427, /* GL_EQUIV */
6158+ 618, /* GL_INVERT */
6159+ 1021, /* GL_OR_REVERSE */
6160+ 270, /* GL_COPY_INVERTED */
6161+ 1020, /* GL_OR_INVERTED */
6162+ 947, /* GL_NAND */
6163+ 1335, /* GL_SET */
6164+ 424, /* GL_EMISSION */
6165+ 1343, /* GL_SHININESS */
6166+ 48, /* GL_AMBIENT_AND_DIFFUSE */
6167+ 165, /* GL_COLOR_INDEXES */
6168+ 897, /* GL_MODELVIEW */
6169+ 1189, /* GL_PROJECTION */
6170+ 1441, /* GL_TEXTURE */
6171+ 138, /* GL_COLOR */
6172+ 313, /* GL_DEPTH */
6173+ 1395, /* GL_STENCIL */
6174+ 164, /* GL_COLOR_INDEX */
6175+ 1409, /* GL_STENCIL_INDEX */
6176+ 322, /* GL_DEPTH_COMPONENT */
6177+ 1230, /* GL_RED */
6178+ 548, /* GL_GREEN */
6179+ 89, /* GL_BLUE */
6180+ 31, /* GL_ALPHA */
6181+ 1254, /* GL_RGB */
6182+ 1273, /* GL_RGBA */
6183+ 668, /* GL_LUMINANCE */
6184+ 689, /* GL_LUMINANCE_ALPHA */
6185+ 73, /* GL_BITMAP */
6186+ 1069, /* GL_POINT */
6187+ 638, /* GL_LINE */
6188+ 442, /* GL_FILL */
6189+ 1239, /* GL_RENDER */
6190+ 438, /* GL_FEEDBACK */
6191+ 1329, /* GL_SELECT */
6192+ 443, /* GL_FLAT */
6193+ 1348, /* GL_SMOOTH */
6194+ 619, /* GL_KEEP */
6195+ 1248, /* GL_REPLACE */
6196+ 575, /* GL_INCR */
6197+ 309, /* GL_DECR */
6198+ 1674, /* GL_VENDOR */
6199+ 1245, /* GL_RENDERER */
6200+ 1675, /* GL_VERSION */
6201+ 431, /* GL_EXTENSIONS */
6202+ 1294, /* GL_S */
6203+ 1432, /* GL_T */
6204+ 1220, /* GL_R */
6205+ 1209, /* GL_Q */
6206+ 933, /* GL_MODULATE */
6207+ 308, /* GL_DECAL */
6208+ 1577, /* GL_TEXTURE_ENV_MODE */
6209+ 1576, /* GL_TEXTURE_ENV_COLOR */
6210+ 1575, /* GL_TEXTURE_ENV */
6211+ 432, /* GL_EYE_LINEAR */
6212+ 980, /* GL_OBJECT_LINEAR */
6213+ 1374, /* GL_SPHERE_MAP */
6214+ 1579, /* GL_TEXTURE_GEN_MODE */
6215+ 982, /* GL_OBJECT_PLANE */
6216+ 433, /* GL_EYE_PLANE */
6217+ 948, /* GL_NEAREST */
6218+ 639, /* GL_LINEAR */
6219+ 952, /* GL_NEAREST_MIPMAP_NEAREST */
6220+ 644, /* GL_LINEAR_MIPMAP_NEAREST */
6221+ 951, /* GL_NEAREST_MIPMAP_LINEAR */
6222+ 643, /* GL_LINEAR_MIPMAP_LINEAR */
6223+ 1600, /* GL_TEXTURE_MAG_FILTER */
6224+ 1608, /* GL_TEXTURE_MIN_FILTER */
6225+ 1621, /* GL_TEXTURE_WRAP_S */
6226+ 1622, /* GL_TEXTURE_WRAP_T */
6227+ 117, /* GL_CLAMP */
6228+ 1247, /* GL_REPEAT */
6229+ 1107, /* GL_POLYGON_OFFSET_UNITS */
6230+ 1106, /* GL_POLYGON_OFFSET_POINT */
6231+ 1105, /* GL_POLYGON_OFFSET_LINE */
6232+ 1221, /* GL_R3_G3_B2 */
6233+ 1671, /* GL_V2F */
6234+ 1672, /* GL_V3F */
6235+ 114, /* GL_C4UB_V2F */
6236+ 115, /* GL_C4UB_V3F */
6237+ 112, /* GL_C3F_V3F */
6238+ 945, /* GL_N3F_V3F */
6239+ 113, /* GL_C4F_N3F_V3F */
6240+ 1437, /* GL_T2F_V3F */
6241+ 1439, /* GL_T4F_V4F */
6242+ 1435, /* GL_T2F_C4UB_V3F */
6243+ 1433, /* GL_T2F_C3F_V3F */
6244+ 1436, /* GL_T2F_N3F_V3F */
6245+ 1434, /* GL_T2F_C4F_N3F_V3F */
6246+ 1438, /* GL_T4F_C4F_N3F_V4F */
6247+ 130, /* GL_CLIP_PLANE0 */
6248+ 131, /* GL_CLIP_PLANE1 */
6249+ 132, /* GL_CLIP_PLANE2 */
6250+ 133, /* GL_CLIP_PLANE3 */
6251+ 134, /* GL_CLIP_PLANE4 */
6252+ 135, /* GL_CLIP_PLANE5 */
6253+ 623, /* GL_LIGHT0 */
6254+ 624, /* GL_LIGHT1 */
6255+ 625, /* GL_LIGHT2 */
6256+ 626, /* GL_LIGHT3 */
6257+ 627, /* GL_LIGHT4 */
6258+ 628, /* GL_LIGHT5 */
6259+ 629, /* GL_LIGHT6 */
6260+ 630, /* GL_LIGHT7 */
6261+ 552, /* GL_HINT_BIT */
6262+ 247, /* GL_CONSTANT_COLOR */
6263+ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
6264+ 242, /* GL_CONSTANT_ALPHA */
6265+ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
6266+ 76, /* GL_BLEND_COLOR */
6267+ 512, /* GL_FUNC_ADD */
6268+ 881, /* GL_MIN */
6269+ 793, /* GL_MAX */
6270+ 81, /* GL_BLEND_EQUATION */
6271+ 516, /* GL_FUNC_SUBTRACT */
6272+ 514, /* GL_FUNC_REVERSE_SUBTRACT */
6273+ 250, /* GL_CONVOLUTION_1D */
6274+ 251, /* GL_CONVOLUTION_2D */
6275+ 1332, /* GL_SEPARABLE_2D */
6276+ 254, /* GL_CONVOLUTION_BORDER_MODE */
6277+ 258, /* GL_CONVOLUTION_FILTER_SCALE */
6278+ 256, /* GL_CONVOLUTION_FILTER_BIAS */
6279+ 1231, /* GL_REDUCE */
6280+ 260, /* GL_CONVOLUTION_FORMAT */
6281+ 264, /* GL_CONVOLUTION_WIDTH */
6282+ 262, /* GL_CONVOLUTION_HEIGHT */
6283+ 808, /* GL_MAX_CONVOLUTION_WIDTH */
6284+ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
6285+ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
6286+ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
6287+ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
6288+ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
6289+ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
6290+ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
6291+ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
6292+ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
6293+ 553, /* GL_HISTOGRAM */
6294+ 1193, /* GL_PROXY_HISTOGRAM */
6295+ 569, /* GL_HISTOGRAM_WIDTH */
6296+ 559, /* GL_HISTOGRAM_FORMAT */
6297+ 565, /* GL_HISTOGRAM_RED_SIZE */
6298+ 561, /* GL_HISTOGRAM_GREEN_SIZE */
6299+ 556, /* GL_HISTOGRAM_BLUE_SIZE */
6300+ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
6301+ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
6302+ 567, /* GL_HISTOGRAM_SINK */
6303+ 882, /* GL_MINMAX */
6304+ 884, /* GL_MINMAX_FORMAT */
6305+ 886, /* GL_MINMAX_SINK */
6306+ 1440, /* GL_TABLE_TOO_LARGE_EXT */
6307+ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
6308+ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
6309+ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
6310+ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
6311+ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
6312+ 1104, /* GL_POLYGON_OFFSET_FILL */
6313+ 1103, /* GL_POLYGON_OFFSET_FACTOR */
6314+ 1102, /* GL_POLYGON_OFFSET_BIAS */
6315+ 1251, /* GL_RESCALE_NORMAL */
6316+ 36, /* GL_ALPHA4 */
6317+ 38, /* GL_ALPHA8 */
6318+ 32, /* GL_ALPHA12 */
6319+ 34, /* GL_ALPHA16 */
6320+ 679, /* GL_LUMINANCE4 */
6321+ 685, /* GL_LUMINANCE8 */
6322+ 669, /* GL_LUMINANCE12 */
6323+ 675, /* GL_LUMINANCE16 */
6324+ 680, /* GL_LUMINANCE4_ALPHA4 */
6325+ 683, /* GL_LUMINANCE6_ALPHA2 */
6326+ 686, /* GL_LUMINANCE8_ALPHA8 */
6327+ 672, /* GL_LUMINANCE12_ALPHA4 */
6328+ 670, /* GL_LUMINANCE12_ALPHA12 */
6329+ 676, /* GL_LUMINANCE16_ALPHA16 */
6330+ 593, /* GL_INTENSITY */
6331+ 598, /* GL_INTENSITY4 */
6332+ 600, /* GL_INTENSITY8 */
6333+ 594, /* GL_INTENSITY12 */
6334+ 596, /* GL_INTENSITY16 */
6335+ 1263, /* GL_RGB2_EXT */
6336+ 1264, /* GL_RGB4 */
6337+ 1267, /* GL_RGB5 */
6338+ 1271, /* GL_RGB8 */
6339+ 1255, /* GL_RGB10 */
6340+ 1259, /* GL_RGB12 */
6341+ 1261, /* GL_RGB16 */
6342+ 1278, /* GL_RGBA2 */
6343+ 1280, /* GL_RGBA4 */
6344+ 1268, /* GL_RGB5_A1 */
6345+ 1284, /* GL_RGBA8 */
6346+ 1256, /* GL_RGB10_A2 */
6347+ 1274, /* GL_RGBA12 */
6348+ 1276, /* GL_RGBA16 */
6349+ 1613, /* GL_TEXTURE_RED_SIZE */
6350+ 1585, /* GL_TEXTURE_GREEN_SIZE */
6351+ 1524, /* GL_TEXTURE_BLUE_SIZE */
6352+ 1511, /* GL_TEXTURE_ALPHA_SIZE */
6353+ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
6354+ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
6355+ 1249, /* GL_REPLACE_EXT */
6356+ 1197, /* GL_PROXY_TEXTURE_1D */
6357+ 1200, /* GL_PROXY_TEXTURE_2D */
6358+ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
6359+ 1610, /* GL_TEXTURE_PRIORITY */
6360+ 1615, /* GL_TEXTURE_RESIDENT */
6361+ 1514, /* GL_TEXTURE_BINDING_1D */
6362+ 1516, /* GL_TEXTURE_BINDING_2D */
6363+ 1518, /* GL_TEXTURE_BINDING_3D */
6364+ 1028, /* GL_PACK_SKIP_IMAGES */
6365+ 1024, /* GL_PACK_IMAGE_HEIGHT */
6366+ 1646, /* GL_UNPACK_SKIP_IMAGES */
6367+ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
6368+ 1510, /* GL_TEXTURE_3D */
6369+ 1203, /* GL_PROXY_TEXTURE_3D */
6370+ 1572, /* GL_TEXTURE_DEPTH */
6371+ 1620, /* GL_TEXTURE_WRAP_R */
6372+ 794, /* GL_MAX_3D_TEXTURE_SIZE */
6373+ 1676, /* GL_VERTEX_ARRAY */
6374+ 959, /* GL_NORMAL_ARRAY */
6375+ 139, /* GL_COLOR_ARRAY */
6376+ 578, /* GL_INDEX_ARRAY */
6377+ 1551, /* GL_TEXTURE_COORD_ARRAY */
6378+ 415, /* GL_EDGE_FLAG_ARRAY */
6379+ 1681, /* GL_VERTEX_ARRAY_SIZE */
6380+ 1683, /* GL_VERTEX_ARRAY_TYPE */
6381+ 1682, /* GL_VERTEX_ARRAY_STRIDE */
6382+ 964, /* GL_NORMAL_ARRAY_TYPE */
6383+ 963, /* GL_NORMAL_ARRAY_STRIDE */
6384+ 143, /* GL_COLOR_ARRAY_SIZE */
6385+ 145, /* GL_COLOR_ARRAY_TYPE */
6386+ 144, /* GL_COLOR_ARRAY_STRIDE */
6387+ 583, /* GL_INDEX_ARRAY_TYPE */
6388+ 582, /* GL_INDEX_ARRAY_STRIDE */
6389+ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
6390+ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
6391+ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
6392+ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
6393+ 1680, /* GL_VERTEX_ARRAY_POINTER */
6394+ 962, /* GL_NORMAL_ARRAY_POINTER */
6395+ 142, /* GL_COLOR_ARRAY_POINTER */
6396+ 581, /* GL_INDEX_ARRAY_POINTER */
6397+ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
6398+ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
6399+ 938, /* GL_MULTISAMPLE */
6400+ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
6401+ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
6402+ 1313, /* GL_SAMPLE_COVERAGE */
6403+ 1310, /* GL_SAMPLE_BUFFERS */
6404+ 1301, /* GL_SAMPLES */
6405+ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
6406+ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
6407+ 170, /* GL_COLOR_MATRIX */
6408+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
6409+ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
6410+ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
6411+ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
6412+ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
6413+ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
6414+ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
6415+ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
6416+ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
6417+ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
6418+ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
6419+ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
6420+ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
6421+ 80, /* GL_BLEND_DST_RGB */
6422+ 88, /* GL_BLEND_SRC_RGB */
6423+ 79, /* GL_BLEND_DST_ALPHA */
6424+ 87, /* GL_BLEND_SRC_ALPHA */
6425+ 176, /* GL_COLOR_TABLE */
6426+ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
6427+ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
6428+ 1192, /* GL_PROXY_COLOR_TABLE */
6429+ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
6430+ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
6431+ 200, /* GL_COLOR_TABLE_SCALE */
6432+ 180, /* GL_COLOR_TABLE_BIAS */
6433+ 185, /* GL_COLOR_TABLE_FORMAT */
6434+ 202, /* GL_COLOR_TABLE_WIDTH */
6435+ 197, /* GL_COLOR_TABLE_RED_SIZE */
6436+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
6437+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
6438+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
6439+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
6440+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
6441+ 71, /* GL_BGR */
6442+ 72, /* GL_BGRA */
6443+ 816, /* GL_MAX_ELEMENTS_VERTICES */
6444+ 815, /* GL_MAX_ELEMENTS_INDICES */
6445+ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
6446+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
6447+ 1086, /* GL_POINT_SIZE_MIN */
6448+ 1082, /* GL_POINT_SIZE_MAX */
6449+ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
6450+ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
6451+ 118, /* GL_CLAMP_TO_BORDER */
6452+ 121, /* GL_CLAMP_TO_EDGE */
6453+ 1609, /* GL_TEXTURE_MIN_LOD */
6454+ 1607, /* GL_TEXTURE_MAX_LOD */
6455+ 1513, /* GL_TEXTURE_BASE_LEVEL */
6456+ 1606, /* GL_TEXTURE_MAX_LEVEL */
6457+ 572, /* GL_IGNORE_BORDER_HP */
6458+ 246, /* GL_CONSTANT_BORDER_HP */
6459+ 1250, /* GL_REPLICATE_BORDER_HP */
6460+ 252, /* GL_CONVOLUTION_BORDER_COLOR */
6461+ 987, /* GL_OCCLUSION_TEST_HP */
6462+ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
6463+ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
6464+ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
6465+ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
6466+ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
6467+ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6468+ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
6469+ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
6470+ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
6471+ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6472+ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
6473+ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
6474+ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
6475+ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
6476+ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
6477+ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
6478+ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
6479+ 518, /* GL_GENERATE_MIPMAP */
6480+ 519, /* GL_GENERATE_MIPMAP_HINT */
6481+ 481, /* GL_FOG_OFFSET_SGIX */
6482+ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
6483+ 1542, /* GL_TEXTURE_COMPARE_SGIX */
6484+ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
6485+ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
6486+ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
6487+ 323, /* GL_DEPTH_COMPONENT16 */
6488+ 326, /* GL_DEPTH_COMPONENT24 */
6489+ 329, /* GL_DEPTH_COMPONENT32 */
6490+ 274, /* GL_CULL_VERTEX_EXT */
6491+ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
6492+ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
6493+ 1737, /* GL_WRAP_BORDER_SUN */
6494+ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
6495+ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
6496+ 1345, /* GL_SINGLE_COLOR */
6497+ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
6498+ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
6499+ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
6500+ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
6501+ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
6502+ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
6503+ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
6504+ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
6505+ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
6506+ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
6507+ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
6508+ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
6509+ 889, /* GL_MIRRORED_REPEAT */
6510+ 1289, /* GL_RGB_S3TC */
6511+ 1266, /* GL_RGB4_S3TC */
6512+ 1288, /* GL_RGBA_S3TC */
6513+ 1283, /* GL_RGBA4_S3TC */
6514+ 1286, /* GL_RGBA_DXT5_S3TC */
6515+ 1281, /* GL_RGBA4_DXT5_S3TC */
6516+ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
6517+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
6518+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
6519+ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
6520+ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
6521+ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
6522+ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
6523+ 468, /* GL_FOG_COORDINATE_SOURCE */
6524+ 460, /* GL_FOG_COORD */
6525+ 484, /* GL_FRAGMENT_DEPTH */
6526+ 280, /* GL_CURRENT_FOG_COORD */
6527+ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
6528+ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
6529+ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
6530+ 462, /* GL_FOG_COORDINATE_ARRAY */
6531+ 174, /* GL_COLOR_SUM */
6532+ 299, /* GL_CURRENT_SECONDARY_COLOR */
6533+ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
6534+ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
6535+ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
6536+ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
6537+ 1322, /* GL_SECONDARY_COLOR_ARRAY */
6538+ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
6539+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
6540+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
6541+ 1442, /* GL_TEXTURE0 */
6542+ 1444, /* GL_TEXTURE1 */
6543+ 1466, /* GL_TEXTURE2 */
6544+ 1488, /* GL_TEXTURE3 */
6545+ 1494, /* GL_TEXTURE4 */
6546+ 1496, /* GL_TEXTURE5 */
6547+ 1498, /* GL_TEXTURE6 */
6548+ 1500, /* GL_TEXTURE7 */
6549+ 1502, /* GL_TEXTURE8 */
6550+ 1504, /* GL_TEXTURE9 */
6551+ 1445, /* GL_TEXTURE10 */
6552+ 1447, /* GL_TEXTURE11 */
6553+ 1449, /* GL_TEXTURE12 */
6554+ 1451, /* GL_TEXTURE13 */
6555+ 1453, /* GL_TEXTURE14 */
6556+ 1455, /* GL_TEXTURE15 */
6557+ 1457, /* GL_TEXTURE16 */
6558+ 1459, /* GL_TEXTURE17 */
6559+ 1461, /* GL_TEXTURE18 */
6560+ 1463, /* GL_TEXTURE19 */
6561+ 1467, /* GL_TEXTURE20 */
6562+ 1469, /* GL_TEXTURE21 */
6563+ 1471, /* GL_TEXTURE22 */
6564+ 1473, /* GL_TEXTURE23 */
6565+ 1475, /* GL_TEXTURE24 */
6566+ 1477, /* GL_TEXTURE25 */
6567+ 1479, /* GL_TEXTURE26 */
6568+ 1481, /* GL_TEXTURE27 */
6569+ 1483, /* GL_TEXTURE28 */
6570+ 1485, /* GL_TEXTURE29 */
6571+ 1489, /* GL_TEXTURE30 */
6572+ 1491, /* GL_TEXTURE31 */
6573+ 18, /* GL_ACTIVE_TEXTURE */
6574+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
6575+ 867, /* GL_MAX_TEXTURE_UNITS */
6576+ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
6577+ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
6578+ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
6579+ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
6580+ 1430, /* GL_SUBTRACT */
6581+ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
6582+ 222, /* GL_COMPRESSED_ALPHA */
6583+ 226, /* GL_COMPRESSED_LUMINANCE */
6584+ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
6585+ 224, /* GL_COMPRESSED_INTENSITY */
6586+ 230, /* GL_COMPRESSED_RGB */
6587+ 231, /* GL_COMPRESSED_RGBA */
6588+ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
6589+ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
6590+ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
6591+ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
6592+ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
6593+ 335, /* GL_DEPTH_STENCIL_NV */
6594+ 1655, /* GL_UNSIGNED_INT_24_8_NV */
6595+ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
6596+ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
6597+ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
6598+ 1578, /* GL_TEXTURE_FILTER_CONTROL */
6599+ 1593, /* GL_TEXTURE_LOD_BIAS */
6600+ 207, /* GL_COMBINE4 */
6601+ 857, /* GL_MAX_SHININESS_NV */
6602+ 858, /* GL_MAX_SPOT_EXPONENT_NV */
6603+ 576, /* GL_INCR_WRAP */
6604+ 310, /* GL_DECR_WRAP */
6605+ 909, /* GL_MODELVIEW1_ARB */
6606+ 965, /* GL_NORMAL_MAP */
6607+ 1236, /* GL_REFLECTION_MAP */
6608+ 1558, /* GL_TEXTURE_CUBE_MAP */
6609+ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
6610+ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
6611+ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
6612+ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
6613+ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
6614+ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
6615+ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
6616+ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
6617+ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
6618+ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
6619+ 476, /* GL_FOG_DISTANCE_MODE_NV */
6620+ 435, /* GL_EYE_RADIAL_NV */
6621+ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
6622+ 206, /* GL_COMBINE */
6623+ 213, /* GL_COMBINE_RGB */
6624+ 208, /* GL_COMBINE_ALPHA */
6625+ 1290, /* GL_RGB_SCALE */
6626+ 24, /* GL_ADD_SIGNED */
6627+ 603, /* GL_INTERPOLATE */
6628+ 241, /* GL_CONSTANT */
6629+ 1155, /* GL_PRIMARY_COLOR */
6630+ 1152, /* GL_PREVIOUS */
6631+ 1356, /* GL_SOURCE0_RGB */
6632+ 1362, /* GL_SOURCE1_RGB */
6633+ 1368, /* GL_SOURCE2_RGB */
6634+ 1372, /* GL_SOURCE3_RGB_NV */
6635+ 1353, /* GL_SOURCE0_ALPHA */
6636+ 1359, /* GL_SOURCE1_ALPHA */
6637+ 1365, /* GL_SOURCE2_ALPHA */
6638+ 1371, /* GL_SOURCE3_ALPHA_NV */
6639+ 1001, /* GL_OPERAND0_RGB */
6640+ 1007, /* GL_OPERAND1_RGB */
6641+ 1013, /* GL_OPERAND2_RGB */
6642+ 1017, /* GL_OPERAND3_RGB_NV */
6643+ 998, /* GL_OPERAND0_ALPHA */
6644+ 1004, /* GL_OPERAND1_ALPHA */
6645+ 1010, /* GL_OPERAND2_ALPHA */
6646+ 1016, /* GL_OPERAND3_ALPHA_NV */
6647+ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
6648+ 1741, /* GL_YCBCR_422_APPLE */
6649+ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
6650+ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
6651+ 1347, /* GL_SLICE_ACCUM_SUN */
6652+ 1212, /* GL_QUAD_MESH_SUN */
6653+ 1639, /* GL_TRIANGLE_MESH_SUN */
6654+ 1715, /* GL_VERTEX_PROGRAM_ARB */
6655+ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
6656+ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
6657+ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
6658+ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
6659+ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
6660+ 301, /* GL_CURRENT_VERTEX_ATTRIB */
6661+ 1168, /* GL_PROGRAM_LENGTH_ARB */
6662+ 1182, /* GL_PROGRAM_STRING_ARB */
6663+ 931, /* GL_MODELVIEW_PROJECTION_NV */
6664+ 571, /* GL_IDENTITY_NV */
6665+ 616, /* GL_INVERSE_NV */
6666+ 1632, /* GL_TRANSPOSE_NV */
6667+ 617, /* GL_INVERSE_TRANSPOSE_NV */
6668+ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
6669+ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
6670+ 747, /* GL_MATRIX0_NV */
6671+ 759, /* GL_MATRIX1_NV */
6672+ 771, /* GL_MATRIX2_NV */
6673+ 775, /* GL_MATRIX3_NV */
6674+ 777, /* GL_MATRIX4_NV */
6675+ 779, /* GL_MATRIX5_NV */
6676+ 781, /* GL_MATRIX6_NV */
6677+ 783, /* GL_MATRIX7_NV */
6678+ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
6679+ 283, /* GL_CURRENT_MATRIX_ARB */
6680+ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
6681+ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
6682+ 1180, /* GL_PROGRAM_PARAMETER_NV */
6683+ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
6684+ 1184, /* GL_PROGRAM_TARGET_NV */
6685+ 1181, /* GL_PROGRAM_RESIDENT_NV */
6686+ 1624, /* GL_TRACK_MATRIX_NV */
6687+ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
6688+ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
6689+ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
6690+ 320, /* GL_DEPTH_CLAMP_NV */
6691+ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
6692+ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
6693+ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
6694+ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
6695+ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
6696+ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
6697+ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
6698+ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
6699+ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
6700+ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
6701+ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
6702+ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
6703+ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
6704+ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
6705+ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
6706+ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
6707+ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
6708+ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
6709+ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
6710+ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
6711+ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
6712+ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
6713+ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
6714+ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
6715+ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
6716+ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
6717+ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
6718+ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
6719+ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
6720+ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
6721+ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
6722+ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
6723+ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
6724+ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
6725+ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
6726+ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
6727+ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
6728+ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
6729+ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
6730+ 1161, /* GL_PROGRAM_BINDING_ARB */
6731+ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
6732+ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
6733+ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
6734+ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
6735+ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
6736+ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
6737+ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
6738+ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
6739+ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
6740+ 1544, /* GL_TEXTURE_COMPRESSED */
6741+ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
6742+ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
6743+ 879, /* GL_MAX_VERTEX_UNITS_ARB */
6744+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
6745+ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
6746+ 1714, /* GL_VERTEX_BLEND_ARB */
6747+ 303, /* GL_CURRENT_WEIGHT_ARB */
6748+ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
6749+ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
6750+ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
6751+ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
6752+ 1729, /* GL_WEIGHT_ARRAY_ARB */
6753+ 346, /* GL_DOT3_RGB */
6754+ 347, /* GL_DOT3_RGBA */
6755+ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
6756+ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
6757+ 939, /* GL_MULTISAMPLE_3DFX */
6758+ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
6759+ 1302, /* GL_SAMPLES_3DFX */
6760+ 920, /* GL_MODELVIEW2_ARB */
6761+ 923, /* GL_MODELVIEW3_ARB */
6762+ 924, /* GL_MODELVIEW4_ARB */
6763+ 925, /* GL_MODELVIEW5_ARB */
6764+ 926, /* GL_MODELVIEW6_ARB */
6765+ 927, /* GL_MODELVIEW7_ARB */
6766+ 928, /* GL_MODELVIEW8_ARB */
6767+ 929, /* GL_MODELVIEW9_ARB */
6768+ 899, /* GL_MODELVIEW10_ARB */
6769+ 900, /* GL_MODELVIEW11_ARB */
6770+ 901, /* GL_MODELVIEW12_ARB */
6771+ 902, /* GL_MODELVIEW13_ARB */
6772+ 903, /* GL_MODELVIEW14_ARB */
6773+ 904, /* GL_MODELVIEW15_ARB */
6774+ 905, /* GL_MODELVIEW16_ARB */
6775+ 906, /* GL_MODELVIEW17_ARB */
6776+ 907, /* GL_MODELVIEW18_ARB */
6777+ 908, /* GL_MODELVIEW19_ARB */
6778+ 910, /* GL_MODELVIEW20_ARB */
6779+ 911, /* GL_MODELVIEW21_ARB */
6780+ 912, /* GL_MODELVIEW22_ARB */
6781+ 913, /* GL_MODELVIEW23_ARB */
6782+ 914, /* GL_MODELVIEW24_ARB */
6783+ 915, /* GL_MODELVIEW25_ARB */
6784+ 916, /* GL_MODELVIEW26_ARB */
6785+ 917, /* GL_MODELVIEW27_ARB */
6786+ 918, /* GL_MODELVIEW28_ARB */
6787+ 919, /* GL_MODELVIEW29_ARB */
6788+ 921, /* GL_MODELVIEW30_ARB */
6789+ 922, /* GL_MODELVIEW31_ARB */
6790+ 351, /* GL_DOT3_RGB_EXT */
6791+ 349, /* GL_DOT3_RGBA_EXT */
6792+ 893, /* GL_MIRROR_CLAMP_EXT */
6793+ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
6794+ 934, /* GL_MODULATE_ADD_ATI */
6795+ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
6796+ 936, /* GL_MODULATE_SUBTRACT_ATI */
6797+ 1742, /* GL_YCBCR_MESA */
6798+ 1025, /* GL_PACK_INVERT_MESA */
6799+ 306, /* GL_DEBUG_OBJECT_MESA */
6800+ 307, /* GL_DEBUG_PRINT_MESA */
6801+ 305, /* GL_DEBUG_ASSERT_MESA */
6802+ 107, /* GL_BUFFER_SIZE */
6803+ 109, /* GL_BUFFER_USAGE */
6804+ 1398, /* GL_STENCIL_BACK_FUNC */
6805+ 1397, /* GL_STENCIL_BACK_FAIL */
6806+ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
6807+ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
6808+ 485, /* GL_FRAGMENT_PROGRAM_ARB */
6809+ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
6810+ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
6811+ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
6812+ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6813+ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6814+ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6815+ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
6816+ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
6817+ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
6818+ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6819+ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6820+ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6821+ 812, /* GL_MAX_DRAW_BUFFERS */
6822+ 355, /* GL_DRAW_BUFFER0 */
6823+ 358, /* GL_DRAW_BUFFER1 */
6824+ 379, /* GL_DRAW_BUFFER2 */
6825+ 382, /* GL_DRAW_BUFFER3 */
6826+ 385, /* GL_DRAW_BUFFER4 */
6827+ 388, /* GL_DRAW_BUFFER5 */
6828+ 391, /* GL_DRAW_BUFFER6 */
6829+ 394, /* GL_DRAW_BUFFER7 */
6830+ 397, /* GL_DRAW_BUFFER8 */
6831+ 400, /* GL_DRAW_BUFFER9 */
6832+ 359, /* GL_DRAW_BUFFER10 */
6833+ 362, /* GL_DRAW_BUFFER11 */
6834+ 365, /* GL_DRAW_BUFFER12 */
6835+ 368, /* GL_DRAW_BUFFER13 */
6836+ 371, /* GL_DRAW_BUFFER14 */
6837+ 374, /* GL_DRAW_BUFFER15 */
6838+ 82, /* GL_BLEND_EQUATION_ALPHA */
6839+ 792, /* GL_MATRIX_PALETTE_ARB */
6840+ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
6841+ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
6842+ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
6843+ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
6844+ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
6845+ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
6846+ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
6847+ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
6848+ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
6849+ 1573, /* GL_TEXTURE_DEPTH_SIZE */
6850+ 339, /* GL_DEPTH_TEXTURE_MODE */
6851+ 1539, /* GL_TEXTURE_COMPARE_MODE */
6852+ 1537, /* GL_TEXTURE_COMPARE_FUNC */
6853+ 217, /* GL_COMPARE_R_TO_TEXTURE */
6854+ 1093, /* GL_POINT_SPRITE */
6855+ 266, /* GL_COORD_REPLACE */
6856+ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
6857+ 1214, /* GL_QUERY_COUNTER_BITS */
6858+ 291, /* GL_CURRENT_QUERY */
6859+ 1216, /* GL_QUERY_RESULT */
6860+ 1218, /* GL_QUERY_RESULT_AVAILABLE */
6861+ 873, /* GL_MAX_VERTEX_ATTRIBS */
6862+ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
6863+ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
6864+ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
6865+ 859, /* GL_MAX_TEXTURE_COORDS */
6866+ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
6867+ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
6868+ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
6869+ 1165, /* GL_PROGRAM_FORMAT_ARB */
6870+ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
6871+ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
6872+ 317, /* GL_DEPTH_BOUNDS_EXT */
6873+ 52, /* GL_ARRAY_BUFFER */
6874+ 420, /* GL_ELEMENT_ARRAY_BUFFER */
6875+ 54, /* GL_ARRAY_BUFFER_BINDING */
6876+ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
6877+ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
6878+ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
6879+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
6880+ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
6881+ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
6882+ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
6883+ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
6884+ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
6885+ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
6886+ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
6887+ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
6888+ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
6889+ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6890+ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6891+ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
6892+ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
6893+ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
6894+ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
6895+ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
6896+ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
6897+ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
6898+ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
6899+ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
6900+ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
6901+ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
6902+ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
6903+ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
6904+ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
6905+ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6906+ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6907+ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
6908+ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
6909+ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
6910+ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
6911+ 1226, /* GL_READ_ONLY */
6912+ 1738, /* GL_WRITE_ONLY */
6913+ 1228, /* GL_READ_WRITE */
6914+ 101, /* GL_BUFFER_ACCESS */
6915+ 103, /* GL_BUFFER_MAPPED */
6916+ 105, /* GL_BUFFER_MAP_POINTER */
6917+ 1623, /* GL_TIME_ELAPSED_EXT */
6918+ 746, /* GL_MATRIX0_ARB */
6919+ 758, /* GL_MATRIX1_ARB */
6920+ 770, /* GL_MATRIX2_ARB */
6921+ 774, /* GL_MATRIX3_ARB */
6922+ 776, /* GL_MATRIX4_ARB */
6923+ 778, /* GL_MATRIX5_ARB */
6924+ 780, /* GL_MATRIX6_ARB */
6925+ 782, /* GL_MATRIX7_ARB */
6926+ 784, /* GL_MATRIX8_ARB */
6927+ 785, /* GL_MATRIX9_ARB */
6928+ 748, /* GL_MATRIX10_ARB */
6929+ 749, /* GL_MATRIX11_ARB */
6930+ 750, /* GL_MATRIX12_ARB */
6931+ 751, /* GL_MATRIX13_ARB */
6932+ 752, /* GL_MATRIX14_ARB */
6933+ 753, /* GL_MATRIX15_ARB */
6934+ 754, /* GL_MATRIX16_ARB */
6935+ 755, /* GL_MATRIX17_ARB */
6936+ 756, /* GL_MATRIX18_ARB */
6937+ 757, /* GL_MATRIX19_ARB */
6938+ 760, /* GL_MATRIX20_ARB */
6939+ 761, /* GL_MATRIX21_ARB */
6940+ 762, /* GL_MATRIX22_ARB */
6941+ 763, /* GL_MATRIX23_ARB */
6942+ 764, /* GL_MATRIX24_ARB */
6943+ 765, /* GL_MATRIX25_ARB */
6944+ 766, /* GL_MATRIX26_ARB */
6945+ 767, /* GL_MATRIX27_ARB */
6946+ 768, /* GL_MATRIX28_ARB */
6947+ 769, /* GL_MATRIX29_ARB */
6948+ 772, /* GL_MATRIX30_ARB */
6949+ 773, /* GL_MATRIX31_ARB */
6950+ 1425, /* GL_STREAM_DRAW */
6951+ 1427, /* GL_STREAM_READ */
6952+ 1423, /* GL_STREAM_COPY */
6953+ 1391, /* GL_STATIC_DRAW */
6954+ 1393, /* GL_STATIC_READ */
6955+ 1389, /* GL_STATIC_COPY */
6956+ 410, /* GL_DYNAMIC_DRAW */
6957+ 412, /* GL_DYNAMIC_READ */
6958+ 408, /* GL_DYNAMIC_COPY */
6959+ 535, /* GL_GL_PIXEL_PACK_BUFFER */
6960+ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
6961+ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
6962+ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
6963+ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
6964+ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
6965+ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
6966+ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
6967+ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
6968+ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
6969+ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
6970+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
6971+ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
6972+ 1304, /* GL_SAMPLES_PASSED */
6973+ 486, /* GL_FRAGMENT_SHADER */
6974+ 1724, /* GL_VERTEX_SHADER */
6975+ 1178, /* GL_PROGRAM_OBJECT_ARB */
6976+ 1336, /* GL_SHADER_OBJECT_ARB */
6977+ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
6978+ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
6979+ 871, /* GL_MAX_VARYING_FLOATS */
6980+ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
6981+ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
6982+ 985, /* GL_OBJECT_TYPE_ARB */
6983+ 1338, /* GL_SHADER_TYPE */
6984+ 451, /* GL_FLOAT_VEC2 */
6985+ 453, /* GL_FLOAT_VEC3 */
6986+ 455, /* GL_FLOAT_VEC4 */
6987+ 606, /* GL_INT_VEC2 */
6988+ 608, /* GL_INT_VEC3 */
6989+ 610, /* GL_INT_VEC4 */
6990+ 93, /* GL_BOOL */
6991+ 95, /* GL_BOOL_VEC2 */
6992+ 97, /* GL_BOOL_VEC3 */
6993+ 99, /* GL_BOOL_VEC4 */
6994+ 445, /* GL_FLOAT_MAT2 */
6995+ 447, /* GL_FLOAT_MAT3 */
6996+ 449, /* GL_FLOAT_MAT4 */
6997+ 1295, /* GL_SAMPLER_1D */
6998+ 1297, /* GL_SAMPLER_2D */
6999+ 1299, /* GL_SAMPLER_3D */
7000+ 1300, /* GL_SAMPLER_CUBE */
7001+ 1296, /* GL_SAMPLER_1D_SHADOW */
7002+ 1298, /* GL_SAMPLER_2D_SHADOW */
7003+ 529, /* GL_GL_FLOAT_MAT2x3 */
7004+ 530, /* GL_GL_FLOAT_MAT2x4 */
7005+ 531, /* GL_GL_FLOAT_MAT3x2 */
7006+ 532, /* GL_GL_FLOAT_MAT3x4 */
7007+ 533, /* GL_GL_FLOAT_MAT4x2 */
7008+ 534, /* GL_GL_FLOAT_MAT4x3 */
7009+ 312, /* GL_DELETE_STATUS */
7010+ 221, /* GL_COMPILE_STATUS */
7011+ 659, /* GL_LINK_STATUS */
7012+ 1673, /* GL_VALIDATE_STATUS */
7013+ 591, /* GL_INFO_LOG_LENGTH */
7014+ 56, /* GL_ATTACHED_SHADERS */
7015+ 20, /* GL_ACTIVE_UNIFORMS */
7016+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
7017+ 1337, /* GL_SHADER_SOURCE_LENGTH */
7018+ 15, /* GL_ACTIVE_ATTRIBUTES */
7019+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
7020+ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
7021+ 1340, /* GL_SHADING_LANGUAGE_VERSION */
7022+ 290, /* GL_CURRENT_PROGRAM */
7023+ 1034, /* GL_PALETTE4_RGB8_OES */
7024+ 1036, /* GL_PALETTE4_RGBA8_OES */
7025+ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
7026+ 1035, /* GL_PALETTE4_RGBA4_OES */
7027+ 1033, /* GL_PALETTE4_RGB5_A1_OES */
7028+ 1039, /* GL_PALETTE8_RGB8_OES */
7029+ 1041, /* GL_PALETTE8_RGBA8_OES */
7030+ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
7031+ 1040, /* GL_PALETTE8_RGBA4_OES */
7032+ 1038, /* GL_PALETTE8_RGB5_A1_OES */
7033+ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
7034+ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
7035+ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
7036+ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
7037+ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
7038+ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
7039+ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
7040+ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
7041+ 543, /* GL_GL_SRGB */
7042+ 544, /* GL_GL_SRGB8 */
7043+ 546, /* GL_GL_SRGB_ALPHA */
7044+ 545, /* GL_GL_SRGB8_ALPHA8 */
7045+ 542, /* GL_GL_SLUMINANCE_ALPHA */
7046+ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
7047+ 539, /* GL_GL_SLUMINANCE */
7048+ 540, /* GL_GL_SLUMINANCE8 */
7049+ 526, /* GL_GL_COMPRESSED_SRGB */
7050+ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
7051+ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
7052+ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
7053+ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
7054+ 667, /* GL_LOWER_LEFT */
7055+ 1670, /* GL_UPPER_LEFT */
7056+ 1401, /* GL_STENCIL_BACK_REF */
7057+ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
7058+ 1403, /* GL_STENCIL_BACK_WRITEMASK */
7059+ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
7060+ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
7061+ 1225, /* GL_READ_FRAMEBUFFER_EXT */
7062+ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
7063+ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
7064+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
7065+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
7066+ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
7067+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
7068+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
7069+ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
7070+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
7071+ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
7072+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
7073+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
7074+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
7075+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
7076+ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
7077+ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
7078+ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
7079+ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
7080+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
7081+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
7082+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
7083+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
7084+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
7085+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
7086+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
7087+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
7088+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
7089+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
7090+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
7091+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
7092+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
7093+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
7094+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
7095+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
7096+ 314, /* GL_DEPTH_ATTACHMENT_EXT */
7097+ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
7098+ 497, /* GL_FRAMEBUFFER_EXT */
7099+ 1241, /* GL_RENDERBUFFER_EXT */
7100+ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
7101+ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
7102+ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
7103+ 1414, /* GL_STENCIL_INDEX_EXT */
7104+ 1411, /* GL_STENCIL_INDEX1_EXT */
7105+ 1412, /* GL_STENCIL_INDEX4_EXT */
7106+ 1413, /* GL_STENCIL_INDEX8_EXT */
7107+ 1410, /* GL_STENCIL_INDEX16_EXT */
7108+ 428, /* GL_EVAL_BIT */
7109+ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
7110+ 661, /* GL_LIST_BIT */
7111+ 1523, /* GL_TEXTURE_BIT */
7112+ 1319, /* GL_SCISSOR_BIT */
7113+ 29, /* GL_ALL_ATTRIB_BITS */
7114+ 941, /* GL_MULTISAMPLE_BIT */
7115+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
7116+};
7117+
7118+#define Elements(x) sizeof(x)/sizeof(*x)
7119+
7120+typedef int (*cfunc)(const void *, const void *);
7121+
7122+/**
7123+ * Compare a key name to an element in the \c all_enums array.
7124+ *
7125+ * \c bsearch always passes the key as the first parameter and the pointer
7126+ * to the array element as the second parameter. We can elimiate some
7127+ * extra work by taking advantage of that fact.
7128+ *
7129+ * \param a Pointer to the desired enum name.
7130+ * \param b Pointer to an element of the \c all_enums array.
7131+ */
7132+static int compar_name( const char *a, const enum_elt *b )
7133+{
7134+ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
7135+}
7136+
7137+/**
7138+ * Compare a key enum value to an element in the \c all_enums array.
7139+ *
7140+ * \c bsearch always passes the key as the first parameter and the pointer
7141+ * to the array element as the second parameter. We can elimiate some
7142+ * extra work by taking advantage of that fact.
7143+ *
7144+ * \param a Pointer to the desired enum name.
7145+ * \param b Pointer to an index into the \c all_enums array.
7146+ */
7147+static int compar_nr( const int *a, const unsigned *b )
7148+{
7149+ return a[0] - all_enums[*b].n;
7150+}
7151+
7152+
7153+static char token_tmp[20];
7154+
7155+const char *_mesa_lookup_enum_by_nr( int nr )
7156+{
7157+ unsigned * i;
7158+
7159+ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
7160+ sizeof(reduced_enums[0]), (cfunc) compar_nr );
7161+
7162+ if ( i != NULL ) {
7163+ return & enum_string_table[ all_enums[ *i ].offset ];
7164+ }
7165+ else {
7166+ /* this is not re-entrant safe, no big deal here */
7167+ _mesa_sprintf(token_tmp, "0x%x", nr);
7168+ return token_tmp;
7169+ }
7170+}
7171+
7172+int _mesa_lookup_enum_by_name( const char *symbol )
7173+{
7174+ enum_elt * f = NULL;
7175+
7176+ if ( symbol != NULL ) {
7177+ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
7178+ sizeof( enum_elt ), (cfunc) compar_name );
7179+ }
7180+
7181+ return (f != NULL) ? f->n : -1;
7182+}
7183+
7184+
7185diff --git a/target-i386/mesa_get.c b/target-i386/mesa_get.c
7186new file mode 100644
7187index 0000000..3b4c9aa
7188--- /dev/null
7189+++ b/target-i386/mesa_get.c
7190@@ -0,0 +1,5563 @@
7191+
7192+/***
7193+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
7194+ ***/
7195+
7196+#include "glheader.h"
7197+#include "context.h"
7198+#include "enable.h"
7199+#include "extensions.h"
7200+#include "fbobject.h"
7201+#include "get.h"
7202+#include "macros.h"
7203+#include "mtypes.h"
7204+#include "state.h"
7205+#include "texcompress.h"
7206+
7207+
7208+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
7209+
7210+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
7211+
7212+#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
7213+#define ENUM_TO_INT(E) ( (GLint) (E) )
7214+#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
7215+
7216+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
7217+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
7218+
7219+
7220+/*
7221+ * Check if named extension is enabled, if not generate error and return.
7222+ */
7223+#define CHECK_EXT1(EXT1, FUNC) \
7224+ if (!ctx->Extensions.EXT1) { \
7225+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7226+ return; \
7227+ }
7228+
7229+/*
7230+ * Check if either of two extensions is enabled.
7231+ */
7232+#define CHECK_EXT2(EXT1, EXT2, FUNC) \
7233+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
7234+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7235+ return; \
7236+ }
7237+
7238+/*
7239+ * Check if either of three extensions is enabled.
7240+ */
7241+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
7242+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7243+ !ctx->Extensions.EXT3) { \
7244+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7245+ return; \
7246+ }
7247+
7248+/*
7249+ * Check if either of four extensions is enabled.
7250+ */
7251+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
7252+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7253+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
7254+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7255+ return; \
7256+ }
7257+
7258+
7259+void GLAPIENTRY
7260+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
7261+{
7262+ GET_CURRENT_CONTEXT(ctx);
7263+ ASSERT_OUTSIDE_BEGIN_END(ctx);
7264+
7265+ if (!params)
7266+ return;
7267+
7268+ if (ctx->NewState)
7269+ _mesa_update_state(ctx);
7270+
7271+ if (ctx->Driver.GetBooleanv &&
7272+ ctx->Driver.GetBooleanv(ctx, pname, params))
7273+ return;
7274+
7275+ switch (pname) {
7276+ case GL_ACCUM_RED_BITS:
7277+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
7278+ break;
7279+ case GL_ACCUM_GREEN_BITS:
7280+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
7281+ break;
7282+ case GL_ACCUM_BLUE_BITS:
7283+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
7284+ break;
7285+ case GL_ACCUM_ALPHA_BITS:
7286+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
7287+ break;
7288+ case GL_ACCUM_CLEAR_VALUE:
7289+ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
7290+ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
7291+ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
7292+ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
7293+ break;
7294+ case GL_ALPHA_BIAS:
7295+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
7296+ break;
7297+ case GL_ALPHA_BITS:
7298+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
7299+ break;
7300+ case GL_ALPHA_SCALE:
7301+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
7302+ break;
7303+ case GL_ALPHA_TEST:
7304+ params[0] = ctx->Color.AlphaEnabled;
7305+ break;
7306+ case GL_ALPHA_TEST_FUNC:
7307+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
7308+ break;
7309+ case GL_ALPHA_TEST_REF:
7310+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
7311+ break;
7312+ case GL_ATTRIB_STACK_DEPTH:
7313+ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
7314+ break;
7315+ case GL_AUTO_NORMAL:
7316+ params[0] = ctx->Eval.AutoNormal;
7317+ break;
7318+ case GL_AUX_BUFFERS:
7319+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
7320+ break;
7321+ case GL_BLEND:
7322+ params[0] = ctx->Color.BlendEnabled;
7323+ break;
7324+ case GL_BLEND_DST:
7325+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7326+ break;
7327+ case GL_BLEND_SRC:
7328+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7329+ break;
7330+ case GL_BLEND_SRC_RGB_EXT:
7331+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7332+ break;
7333+ case GL_BLEND_DST_RGB_EXT:
7334+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7335+ break;
7336+ case GL_BLEND_SRC_ALPHA_EXT:
7337+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
7338+ break;
7339+ case GL_BLEND_DST_ALPHA_EXT:
7340+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
7341+ break;
7342+ case GL_BLEND_EQUATION:
7343+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
7344+ break;
7345+ case GL_BLEND_EQUATION_ALPHA_EXT:
7346+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
7347+ break;
7348+ case GL_BLEND_COLOR_EXT:
7349+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
7350+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
7351+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
7352+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
7353+ break;
7354+ case GL_BLUE_BIAS:
7355+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
7356+ break;
7357+ case GL_BLUE_BITS:
7358+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
7359+ break;
7360+ case GL_BLUE_SCALE:
7361+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
7362+ break;
7363+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
7364+ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
7365+ break;
7366+ case GL_CLIP_PLANE0:
7367+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
7368+ break;
7369+ case GL_CLIP_PLANE1:
7370+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
7371+ break;
7372+ case GL_CLIP_PLANE2:
7373+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
7374+ break;
7375+ case GL_CLIP_PLANE3:
7376+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
7377+ break;
7378+ case GL_CLIP_PLANE4:
7379+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
7380+ break;
7381+ case GL_CLIP_PLANE5:
7382+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
7383+ break;
7384+ case GL_COLOR_CLEAR_VALUE:
7385+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
7386+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
7387+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
7388+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
7389+ break;
7390+ case GL_COLOR_MATERIAL:
7391+ params[0] = ctx->Light.ColorMaterialEnabled;
7392+ break;
7393+ case GL_COLOR_MATERIAL_FACE:
7394+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
7395+ break;
7396+ case GL_COLOR_MATERIAL_PARAMETER:
7397+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
7398+ break;
7399+ case GL_COLOR_WRITEMASK:
7400+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
7401+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
7402+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
7403+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
7404+ break;
7405+ case GL_CULL_FACE:
7406+ params[0] = ctx->Polygon.CullFlag;
7407+ break;
7408+ case GL_CULL_FACE_MODE:
7409+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
7410+ break;
7411+ case GL_CURRENT_COLOR:
7412+ {
7413+ FLUSH_CURRENT(ctx, 0);
7414+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
7415+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
7416+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
7417+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
7418+ }
7419+ break;
7420+ case GL_CURRENT_INDEX:
7421+ {
7422+ FLUSH_CURRENT(ctx, 0);
7423+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
7424+ }
7425+ break;
7426+ case GL_CURRENT_NORMAL:
7427+ {
7428+ FLUSH_CURRENT(ctx, 0);
7429+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
7430+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
7431+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
7432+ }
7433+ break;
7434+ case GL_CURRENT_RASTER_COLOR:
7435+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
7436+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
7437+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
7438+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
7439+ break;
7440+ case GL_CURRENT_RASTER_DISTANCE:
7441+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
7442+ break;
7443+ case GL_CURRENT_RASTER_INDEX:
7444+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
7445+ break;
7446+ case GL_CURRENT_RASTER_POSITION:
7447+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
7448+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
7449+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
7450+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
7451+ break;
7452+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
7453+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
7454+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
7455+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
7456+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
7457+ break;
7458+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
7459+ {
7460+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7461+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
7462+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
7463+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
7464+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
7465+ }
7466+ break;
7467+ case GL_CURRENT_RASTER_POSITION_VALID:
7468+ params[0] = ctx->Current.RasterPosValid;
7469+ break;
7470+ case GL_CURRENT_TEXTURE_COORDS:
7471+ {
7472+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7473+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
7474+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
7475+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
7476+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
7477+ }
7478+ break;
7479+ case GL_DEPTH_BIAS:
7480+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
7481+ break;
7482+ case GL_DEPTH_BITS:
7483+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
7484+ break;
7485+ case GL_DEPTH_CLEAR_VALUE:
7486+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
7487+ break;
7488+ case GL_DEPTH_FUNC:
7489+ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
7490+ break;
7491+ case GL_DEPTH_RANGE:
7492+ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
7493+ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
7494+ break;
7495+ case GL_DEPTH_SCALE:
7496+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
7497+ break;
7498+ case GL_DEPTH_TEST:
7499+ params[0] = ctx->Depth.Test;
7500+ break;
7501+ case GL_DEPTH_WRITEMASK:
7502+ params[0] = ctx->Depth.Mask;
7503+ break;
7504+ case GL_DITHER:
7505+ params[0] = ctx->Color.DitherFlag;
7506+ break;
7507+ case GL_DOUBLEBUFFER:
7508+ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
7509+ break;
7510+ case GL_DRAW_BUFFER:
7511+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
7512+ break;
7513+ case GL_EDGE_FLAG:
7514+ {
7515+ FLUSH_CURRENT(ctx, 0);
7516+ params[0] = ctx->Current.EdgeFlag;
7517+ }
7518+ break;
7519+ case GL_FEEDBACK_BUFFER_SIZE:
7520+ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
7521+ break;
7522+ case GL_FEEDBACK_BUFFER_TYPE:
7523+ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
7524+ break;
7525+ case GL_FOG:
7526+ params[0] = ctx->Fog.Enabled;
7527+ break;
7528+ case GL_FOG_COLOR:
7529+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
7530+ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
7531+ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
7532+ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
7533+ break;
7534+ case GL_FOG_DENSITY:
7535+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
7536+ break;
7537+ case GL_FOG_END:
7538+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
7539+ break;
7540+ case GL_FOG_HINT:
7541+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
7542+ break;
7543+ case GL_FOG_INDEX:
7544+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
7545+ break;
7546+ case GL_FOG_MODE:
7547+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
7548+ break;
7549+ case GL_FOG_START:
7550+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
7551+ break;
7552+ case GL_FRONT_FACE:
7553+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
7554+ break;
7555+ case GL_GREEN_BIAS:
7556+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
7557+ break;
7558+ case GL_GREEN_BITS:
7559+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
7560+ break;
7561+ case GL_GREEN_SCALE:
7562+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
7563+ break;
7564+ case GL_INDEX_BITS:
7565+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
7566+ break;
7567+ case GL_INDEX_CLEAR_VALUE:
7568+ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
7569+ break;
7570+ case GL_INDEX_MODE:
7571+ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
7572+ break;
7573+ case GL_INDEX_OFFSET:
7574+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
7575+ break;
7576+ case GL_INDEX_SHIFT:
7577+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
7578+ break;
7579+ case GL_INDEX_WRITEMASK:
7580+ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
7581+ break;
7582+ case GL_LIGHT0:
7583+ params[0] = ctx->Light.Light[0].Enabled;
7584+ break;
7585+ case GL_LIGHT1:
7586+ params[0] = ctx->Light.Light[1].Enabled;
7587+ break;
7588+ case GL_LIGHT2:
7589+ params[0] = ctx->Light.Light[2].Enabled;
7590+ break;
7591+ case GL_LIGHT3:
7592+ params[0] = ctx->Light.Light[3].Enabled;
7593+ break;
7594+ case GL_LIGHT4:
7595+ params[0] = ctx->Light.Light[4].Enabled;
7596+ break;
7597+ case GL_LIGHT5:
7598+ params[0] = ctx->Light.Light[5].Enabled;
7599+ break;
7600+ case GL_LIGHT6:
7601+ params[0] = ctx->Light.Light[6].Enabled;
7602+ break;
7603+ case GL_LIGHT7:
7604+ params[0] = ctx->Light.Light[7].Enabled;
7605+ break;
7606+ case GL_LIGHTING:
7607+ params[0] = ctx->Light.Enabled;
7608+ break;
7609+ case GL_LIGHT_MODEL_AMBIENT:
7610+ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
7611+ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
7612+ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
7613+ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
7614+ break;
7615+ case GL_LIGHT_MODEL_COLOR_CONTROL:
7616+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
7617+ break;
7618+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
7619+ params[0] = ctx->Light.Model.LocalViewer;
7620+ break;
7621+ case GL_LIGHT_MODEL_TWO_SIDE:
7622+ params[0] = ctx->Light.Model.TwoSide;
7623+ break;
7624+ case GL_LINE_SMOOTH:
7625+ params[0] = ctx->Line.SmoothFlag;
7626+ break;
7627+ case GL_LINE_SMOOTH_HINT:
7628+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
7629+ break;
7630+ case GL_LINE_STIPPLE:
7631+ params[0] = ctx->Line.StippleFlag;
7632+ break;
7633+ case GL_LINE_STIPPLE_PATTERN:
7634+ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
7635+ break;
7636+ case GL_LINE_STIPPLE_REPEAT:
7637+ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
7638+ break;
7639+ case GL_LINE_WIDTH:
7640+ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
7641+ break;
7642+ case GL_LINE_WIDTH_GRANULARITY:
7643+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
7644+ break;
7645+ case GL_LINE_WIDTH_RANGE:
7646+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
7647+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
7648+ break;
7649+ case GL_ALIASED_LINE_WIDTH_RANGE:
7650+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
7651+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
7652+ break;
7653+ case GL_LIST_BASE:
7654+ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
7655+ break;
7656+ case GL_LIST_INDEX:
7657+ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
7658+ break;
7659+ case GL_LIST_MODE:
7660+ {
7661+ GLenum mode;
7662+ if (!ctx->CompileFlag)
7663+ mode = 0;
7664+ else if (ctx->ExecuteFlag)
7665+ mode = GL_COMPILE_AND_EXECUTE;
7666+ else
7667+ mode = GL_COMPILE;
7668+ params[0] = ENUM_TO_BOOLEAN(mode);
7669+ }
7670+ break;
7671+ case GL_INDEX_LOGIC_OP:
7672+ params[0] = ctx->Color.IndexLogicOpEnabled;
7673+ break;
7674+ case GL_COLOR_LOGIC_OP:
7675+ params[0] = ctx->Color.ColorLogicOpEnabled;
7676+ break;
7677+ case GL_LOGIC_OP_MODE:
7678+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
7679+ break;
7680+ case GL_MAP1_COLOR_4:
7681+ params[0] = ctx->Eval.Map1Color4;
7682+ break;
7683+ case GL_MAP1_GRID_DOMAIN:
7684+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
7685+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
7686+ break;
7687+ case GL_MAP1_GRID_SEGMENTS:
7688+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
7689+ break;
7690+ case GL_MAP1_INDEX:
7691+ params[0] = ctx->Eval.Map1Index;
7692+ break;
7693+ case GL_MAP1_NORMAL:
7694+ params[0] = ctx->Eval.Map1Normal;
7695+ break;
7696+ case GL_MAP1_TEXTURE_COORD_1:
7697+ params[0] = ctx->Eval.Map1TextureCoord1;
7698+ break;
7699+ case GL_MAP1_TEXTURE_COORD_2:
7700+ params[0] = ctx->Eval.Map1TextureCoord2;
7701+ break;
7702+ case GL_MAP1_TEXTURE_COORD_3:
7703+ params[0] = ctx->Eval.Map1TextureCoord3;
7704+ break;
7705+ case GL_MAP1_TEXTURE_COORD_4:
7706+ params[0] = ctx->Eval.Map1TextureCoord4;
7707+ break;
7708+ case GL_MAP1_VERTEX_3:
7709+ params[0] = ctx->Eval.Map1Vertex3;
7710+ break;
7711+ case GL_MAP1_VERTEX_4:
7712+ params[0] = ctx->Eval.Map1Vertex4;
7713+ break;
7714+ case GL_MAP2_COLOR_4:
7715+ params[0] = ctx->Eval.Map2Color4;
7716+ break;
7717+ case GL_MAP2_GRID_DOMAIN:
7718+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
7719+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
7720+ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
7721+ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
7722+ break;
7723+ case GL_MAP2_GRID_SEGMENTS:
7724+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
7725+ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
7726+ break;
7727+ case GL_MAP2_INDEX:
7728+ params[0] = ctx->Eval.Map2Index;
7729+ break;
7730+ case GL_MAP2_NORMAL:
7731+ params[0] = ctx->Eval.Map2Normal;
7732+ break;
7733+ case GL_MAP2_TEXTURE_COORD_1:
7734+ params[0] = ctx->Eval.Map2TextureCoord1;
7735+ break;
7736+ case GL_MAP2_TEXTURE_COORD_2:
7737+ params[0] = ctx->Eval.Map2TextureCoord2;
7738+ break;
7739+ case GL_MAP2_TEXTURE_COORD_3:
7740+ params[0] = ctx->Eval.Map2TextureCoord3;
7741+ break;
7742+ case GL_MAP2_TEXTURE_COORD_4:
7743+ params[0] = ctx->Eval.Map2TextureCoord4;
7744+ break;
7745+ case GL_MAP2_VERTEX_3:
7746+ params[0] = ctx->Eval.Map2Vertex3;
7747+ break;
7748+ case GL_MAP2_VERTEX_4:
7749+ params[0] = ctx->Eval.Map2Vertex4;
7750+ break;
7751+ case GL_MAP_COLOR:
7752+ params[0] = ctx->Pixel.MapColorFlag;
7753+ break;
7754+ case GL_MAP_STENCIL:
7755+ params[0] = ctx->Pixel.MapStencilFlag;
7756+ break;
7757+ case GL_MATRIX_MODE:
7758+ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
7759+ break;
7760+ case GL_MAX_ATTRIB_STACK_DEPTH:
7761+ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
7762+ break;
7763+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
7764+ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
7765+ break;
7766+ case GL_MAX_CLIP_PLANES:
7767+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
7768+ break;
7769+ case GL_MAX_ELEMENTS_VERTICES:
7770+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7771+ break;
7772+ case GL_MAX_ELEMENTS_INDICES:
7773+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7774+ break;
7775+ case GL_MAX_EVAL_ORDER:
7776+ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
7777+ break;
7778+ case GL_MAX_LIGHTS:
7779+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
7780+ break;
7781+ case GL_MAX_LIST_NESTING:
7782+ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
7783+ break;
7784+ case GL_MAX_MODELVIEW_STACK_DEPTH:
7785+ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
7786+ break;
7787+ case GL_MAX_NAME_STACK_DEPTH:
7788+ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
7789+ break;
7790+ case GL_MAX_PIXEL_MAP_TABLE:
7791+ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
7792+ break;
7793+ case GL_MAX_PROJECTION_STACK_DEPTH:
7794+ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
7795+ break;
7796+ case GL_MAX_TEXTURE_SIZE:
7797+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
7798+ break;
7799+ case GL_MAX_3D_TEXTURE_SIZE:
7800+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
7801+ break;
7802+ case GL_MAX_TEXTURE_STACK_DEPTH:
7803+ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
7804+ break;
7805+ case GL_MAX_VIEWPORT_DIMS:
7806+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
7807+ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
7808+ break;
7809+ case GL_MODELVIEW_MATRIX:
7810+ {
7811+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7812+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7813+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7814+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7815+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7816+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7817+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7818+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7819+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7820+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7821+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7822+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7823+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7824+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7825+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7826+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7827+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7828+ }
7829+ break;
7830+ case GL_MODELVIEW_STACK_DEPTH:
7831+ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
7832+ break;
7833+ case GL_NAME_STACK_DEPTH:
7834+ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
7835+ break;
7836+ case GL_NORMALIZE:
7837+ params[0] = ctx->Transform.Normalize;
7838+ break;
7839+ case GL_PACK_ALIGNMENT:
7840+ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
7841+ break;
7842+ case GL_PACK_LSB_FIRST:
7843+ params[0] = ctx->Pack.LsbFirst;
7844+ break;
7845+ case GL_PACK_ROW_LENGTH:
7846+ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
7847+ break;
7848+ case GL_PACK_SKIP_PIXELS:
7849+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
7850+ break;
7851+ case GL_PACK_SKIP_ROWS:
7852+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
7853+ break;
7854+ case GL_PACK_SWAP_BYTES:
7855+ params[0] = ctx->Pack.SwapBytes;
7856+ break;
7857+ case GL_PACK_SKIP_IMAGES_EXT:
7858+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
7859+ break;
7860+ case GL_PACK_IMAGE_HEIGHT_EXT:
7861+ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
7862+ break;
7863+ case GL_PACK_INVERT_MESA:
7864+ params[0] = ctx->Pack.Invert;
7865+ break;
7866+ case GL_PERSPECTIVE_CORRECTION_HINT:
7867+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
7868+ break;
7869+ case GL_PIXEL_MAP_A_TO_A_SIZE:
7870+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
7871+ break;
7872+ case GL_PIXEL_MAP_B_TO_B_SIZE:
7873+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
7874+ break;
7875+ case GL_PIXEL_MAP_G_TO_G_SIZE:
7876+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
7877+ break;
7878+ case GL_PIXEL_MAP_I_TO_A_SIZE:
7879+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
7880+ break;
7881+ case GL_PIXEL_MAP_I_TO_B_SIZE:
7882+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
7883+ break;
7884+ case GL_PIXEL_MAP_I_TO_G_SIZE:
7885+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
7886+ break;
7887+ case GL_PIXEL_MAP_I_TO_I_SIZE:
7888+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
7889+ break;
7890+ case GL_PIXEL_MAP_I_TO_R_SIZE:
7891+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
7892+ break;
7893+ case GL_PIXEL_MAP_R_TO_R_SIZE:
7894+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
7895+ break;
7896+ case GL_PIXEL_MAP_S_TO_S_SIZE:
7897+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
7898+ break;
7899+ case GL_POINT_SIZE:
7900+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
7901+ break;
7902+ case GL_POINT_SIZE_GRANULARITY:
7903+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
7904+ break;
7905+ case GL_POINT_SIZE_RANGE:
7906+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
7907+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
7908+ break;
7909+ case GL_ALIASED_POINT_SIZE_RANGE:
7910+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
7911+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
7912+ break;
7913+ case GL_POINT_SMOOTH:
7914+ params[0] = ctx->Point.SmoothFlag;
7915+ break;
7916+ case GL_POINT_SMOOTH_HINT:
7917+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
7918+ break;
7919+ case GL_POINT_SIZE_MIN_EXT:
7920+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
7921+ break;
7922+ case GL_POINT_SIZE_MAX_EXT:
7923+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
7924+ break;
7925+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
7926+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
7927+ break;
7928+ case GL_DISTANCE_ATTENUATION_EXT:
7929+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
7930+ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
7931+ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
7932+ break;
7933+ case GL_POLYGON_MODE:
7934+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
7935+ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
7936+ break;
7937+ case GL_POLYGON_OFFSET_BIAS_EXT:
7938+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
7939+ break;
7940+ case GL_POLYGON_OFFSET_FACTOR:
7941+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
7942+ break;
7943+ case GL_POLYGON_OFFSET_UNITS:
7944+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
7945+ break;
7946+ case GL_POLYGON_SMOOTH:
7947+ params[0] = ctx->Polygon.SmoothFlag;
7948+ break;
7949+ case GL_POLYGON_SMOOTH_HINT:
7950+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
7951+ break;
7952+ case GL_POLYGON_STIPPLE:
7953+ params[0] = ctx->Polygon.StippleFlag;
7954+ break;
7955+ case GL_PROJECTION_MATRIX:
7956+ {
7957+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7958+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7959+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7960+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7961+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7962+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7963+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7964+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7965+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7966+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7967+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7968+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7969+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7970+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7971+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7972+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7973+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7974+ }
7975+ break;
7976+ case GL_PROJECTION_STACK_DEPTH:
7977+ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
7978+ break;
7979+ case GL_READ_BUFFER:
7980+ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
7981+ break;
7982+ case GL_RED_BIAS:
7983+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
7984+ break;
7985+ case GL_RED_BITS:
7986+ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
7987+ break;
7988+ case GL_RED_SCALE:
7989+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
7990+ break;
7991+ case GL_RENDER_MODE:
7992+ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
7993+ break;
7994+ case GL_RESCALE_NORMAL:
7995+ params[0] = ctx->Transform.RescaleNormals;
7996+ break;
7997+ case GL_RGBA_MODE:
7998+ params[0] = ctx->DrawBuffer->Visual.rgbMode;
7999+ break;
8000+ case GL_SCISSOR_BOX:
8001+ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
8002+ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
8003+ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
8004+ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
8005+ break;
8006+ case GL_SCISSOR_TEST:
8007+ params[0] = ctx->Scissor.Enabled;
8008+ break;
8009+ case GL_SELECTION_BUFFER_SIZE:
8010+ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
8011+ break;
8012+ case GL_SHADE_MODEL:
8013+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
8014+ break;
8015+ case GL_SHARED_TEXTURE_PALETTE_EXT:
8016+ params[0] = ctx->Texture.SharedPalette;
8017+ break;
8018+ case GL_STENCIL_BITS:
8019+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
8020+ break;
8021+ case GL_STENCIL_CLEAR_VALUE:
8022+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
8023+ break;
8024+ case GL_STENCIL_FAIL:
8025+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
8026+ break;
8027+ case GL_STENCIL_FUNC:
8028+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
8029+ break;
8030+ case GL_STENCIL_PASS_DEPTH_FAIL:
8031+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
8032+ break;
8033+ case GL_STENCIL_PASS_DEPTH_PASS:
8034+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
8035+ break;
8036+ case GL_STENCIL_REF:
8037+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
8038+ break;
8039+ case GL_STENCIL_TEST:
8040+ params[0] = ctx->Stencil.Enabled;
8041+ break;
8042+ case GL_STENCIL_VALUE_MASK:
8043+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
8044+ break;
8045+ case GL_STENCIL_WRITEMASK:
8046+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
8047+ break;
8048+ case GL_STEREO:
8049+ params[0] = ctx->DrawBuffer->Visual.stereoMode;
8050+ break;
8051+ case GL_SUBPIXEL_BITS:
8052+ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
8053+ break;
8054+ case GL_TEXTURE_1D:
8055+ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
8056+ break;
8057+ case GL_TEXTURE_2D:
8058+ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
8059+ break;
8060+ case GL_TEXTURE_3D:
8061+ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
8062+ break;
8063+ case GL_TEXTURE_BINDING_1D:
8064+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
8065+ break;
8066+ case GL_TEXTURE_BINDING_2D:
8067+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
8068+ break;
8069+ case GL_TEXTURE_BINDING_3D:
8070+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
8071+ break;
8072+ case GL_TEXTURE_ENV_COLOR:
8073+ {
8074+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
8075+ params[0] = FLOAT_TO_BOOLEAN(color[0]);
8076+ params[1] = FLOAT_TO_BOOLEAN(color[1]);
8077+ params[2] = FLOAT_TO_BOOLEAN(color[2]);
8078+ params[3] = FLOAT_TO_BOOLEAN(color[3]);
8079+ }
8080+ break;
8081+ case GL_TEXTURE_ENV_MODE:
8082+ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
8083+ break;
8084+ case GL_TEXTURE_GEN_S:
8085+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
8086+ break;
8087+ case GL_TEXTURE_GEN_T:
8088+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
8089+ break;
8090+ case GL_TEXTURE_GEN_R:
8091+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
8092+ break;
8093+ case GL_TEXTURE_GEN_Q:
8094+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
8095+ break;
8096+ case GL_TEXTURE_MATRIX:
8097+ {
8098+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8099+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8100+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8101+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8102+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8103+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8104+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8105+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8106+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8107+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8108+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8109+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8110+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8111+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8112+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8113+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8114+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8115+ }
8116+ break;
8117+ case GL_TEXTURE_STACK_DEPTH:
8118+ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
8119+ break;
8120+ case GL_UNPACK_ALIGNMENT:
8121+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
8122+ break;
8123+ case GL_UNPACK_LSB_FIRST:
8124+ params[0] = ctx->Unpack.LsbFirst;
8125+ break;
8126+ case GL_UNPACK_ROW_LENGTH:
8127+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
8128+ break;
8129+ case GL_UNPACK_SKIP_PIXELS:
8130+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
8131+ break;
8132+ case GL_UNPACK_SKIP_ROWS:
8133+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
8134+ break;
8135+ case GL_UNPACK_SWAP_BYTES:
8136+ params[0] = ctx->Unpack.SwapBytes;
8137+ break;
8138+ case GL_UNPACK_SKIP_IMAGES_EXT:
8139+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
8140+ break;
8141+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
8142+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
8143+ break;
8144+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
8145+ params[0] = ctx->Unpack.ClientStorage;
8146+ break;
8147+ case GL_VIEWPORT:
8148+ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
8149+ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
8150+ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
8151+ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
8152+ break;
8153+ case GL_ZOOM_X:
8154+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
8155+ break;
8156+ case GL_ZOOM_Y:
8157+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
8158+ break;
8159+ case GL_VERTEX_ARRAY:
8160+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
8161+ break;
8162+ case GL_VERTEX_ARRAY_SIZE:
8163+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
8164+ break;
8165+ case GL_VERTEX_ARRAY_TYPE:
8166+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
8167+ break;
8168+ case GL_VERTEX_ARRAY_STRIDE:
8169+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
8170+ break;
8171+ case GL_VERTEX_ARRAY_COUNT_EXT:
8172+ params[0] = INT_TO_BOOLEAN(0);
8173+ break;
8174+ case GL_NORMAL_ARRAY:
8175+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
8176+ break;
8177+ case GL_NORMAL_ARRAY_TYPE:
8178+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
8179+ break;
8180+ case GL_NORMAL_ARRAY_STRIDE:
8181+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
8182+ break;
8183+ case GL_NORMAL_ARRAY_COUNT_EXT:
8184+ params[0] = INT_TO_BOOLEAN(0);
8185+ break;
8186+ case GL_COLOR_ARRAY:
8187+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
8188+ break;
8189+ case GL_COLOR_ARRAY_SIZE:
8190+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
8191+ break;
8192+ case GL_COLOR_ARRAY_TYPE:
8193+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
8194+ break;
8195+ case GL_COLOR_ARRAY_STRIDE:
8196+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
8197+ break;
8198+ case GL_COLOR_ARRAY_COUNT_EXT:
8199+ params[0] = INT_TO_BOOLEAN(0);
8200+ break;
8201+ case GL_INDEX_ARRAY:
8202+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
8203+ break;
8204+ case GL_INDEX_ARRAY_TYPE:
8205+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
8206+ break;
8207+ case GL_INDEX_ARRAY_STRIDE:
8208+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
8209+ break;
8210+ case GL_INDEX_ARRAY_COUNT_EXT:
8211+ params[0] = INT_TO_BOOLEAN(0);
8212+ break;
8213+ case GL_TEXTURE_COORD_ARRAY:
8214+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
8215+ break;
8216+ case GL_TEXTURE_COORD_ARRAY_SIZE:
8217+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
8218+ break;
8219+ case GL_TEXTURE_COORD_ARRAY_TYPE:
8220+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
8221+ break;
8222+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
8223+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
8224+ break;
8225+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
8226+ params[0] = INT_TO_BOOLEAN(0);
8227+ break;
8228+ case GL_EDGE_FLAG_ARRAY:
8229+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
8230+ break;
8231+ case GL_EDGE_FLAG_ARRAY_STRIDE:
8232+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
8233+ break;
8234+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
8235+ params[0] = INT_TO_BOOLEAN(0);
8236+ break;
8237+ case GL_MAX_TEXTURE_UNITS_ARB:
8238+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8239+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
8240+ break;
8241+ case GL_ACTIVE_TEXTURE_ARB:
8242+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8243+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
8244+ break;
8245+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
8246+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8247+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
8248+ break;
8249+ case GL_TEXTURE_CUBE_MAP_ARB:
8250+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8251+ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
8252+ break;
8253+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
8254+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8255+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
8256+ break;
8257+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
8258+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8259+ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
8260+ break;
8261+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
8262+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8263+ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
8264+ break;
8265+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
8266+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8267+ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
8268+ break;
8269+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
8270+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8271+ {
8272+ GLint formats[100];
8273+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
8274+ ASSERT(n <= 100);
8275+ for (i = 0; i < n; i++)
8276+ params[i] = ENUM_TO_INT(formats[i]);
8277+ }
8278+ break;
8279+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
8280+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8281+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
8282+ break;
8283+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
8284+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8285+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
8286+ break;
8287+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
8288+ {
8289+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8290+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8291+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8292+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8293+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8294+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8295+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8296+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8297+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8298+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8299+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8300+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8301+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8302+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8303+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8304+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8305+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8306+ }
8307+ break;
8308+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
8309+ {
8310+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
8311+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8312+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8313+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8314+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8315+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8316+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8317+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8318+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8319+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8320+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8321+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8322+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8323+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8324+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8325+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8326+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8327+ }
8328+ break;
8329+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
8330+ {
8331+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
8332+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8333+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8334+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8335+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8336+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8337+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8338+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8339+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8340+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8341+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8342+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8343+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8344+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8345+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8346+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8347+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8348+ }
8349+ break;
8350+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
8351+ {
8352+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8353+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8354+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8355+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8356+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8357+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8358+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8359+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8360+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8361+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8362+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8363+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8364+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8365+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8366+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8367+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8368+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8369+ }
8370+ break;
8371+ case GL_COLOR_MATRIX_SGI:
8372+ {
8373+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8374+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8375+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8376+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8377+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8378+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8379+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8380+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8381+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8382+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8383+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8384+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8385+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8386+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8387+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8388+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8389+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8390+ }
8391+ break;
8392+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
8393+ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
8394+ break;
8395+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
8396+ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
8397+ break;
8398+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
8399+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
8400+ break;
8401+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
8402+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
8403+ break;
8404+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
8405+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
8406+ break;
8407+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
8408+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
8409+ break;
8410+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
8411+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
8412+ break;
8413+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
8414+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
8415+ break;
8416+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
8417+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
8418+ break;
8419+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
8420+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
8421+ break;
8422+ case GL_CONVOLUTION_1D_EXT:
8423+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8424+ params[0] = ctx->Pixel.Convolution1DEnabled;
8425+ break;
8426+ case GL_CONVOLUTION_2D_EXT:
8427+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8428+ params[0] = ctx->Pixel.Convolution2DEnabled;
8429+ break;
8430+ case GL_SEPARABLE_2D_EXT:
8431+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8432+ params[0] = ctx->Pixel.Separable2DEnabled;
8433+ break;
8434+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
8435+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8436+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
8437+ break;
8438+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
8439+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8440+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
8441+ break;
8442+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
8443+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8444+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
8445+ break;
8446+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
8447+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8448+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
8449+ break;
8450+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
8451+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8452+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
8453+ break;
8454+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
8455+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8456+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
8457+ break;
8458+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
8459+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8460+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
8461+ break;
8462+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
8463+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8464+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
8465+ break;
8466+ case GL_HISTOGRAM:
8467+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8468+ params[0] = ctx->Pixel.HistogramEnabled;
8469+ break;
8470+ case GL_MINMAX:
8471+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8472+ params[0] = ctx->Pixel.MinMaxEnabled;
8473+ break;
8474+ case GL_COLOR_TABLE_SGI:
8475+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8476+ params[0] = ctx->Pixel.ColorTableEnabled;
8477+ break;
8478+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
8479+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8480+ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
8481+ break;
8482+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
8483+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8484+ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
8485+ break;
8486+ case GL_TEXTURE_COLOR_TABLE_SGI:
8487+ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
8488+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
8489+ break;
8490+ case GL_COLOR_SUM_EXT:
8491+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
8492+ params[0] = ctx->Fog.ColorSumEnabled;
8493+ break;
8494+ case GL_CURRENT_SECONDARY_COLOR_EXT:
8495+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8496+ {
8497+ FLUSH_CURRENT(ctx, 0);
8498+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
8499+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
8500+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
8501+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
8502+ }
8503+ break;
8504+ case GL_SECONDARY_COLOR_ARRAY_EXT:
8505+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8506+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
8507+ break;
8508+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
8509+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8510+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
8511+ break;
8512+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
8513+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8514+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
8515+ break;
8516+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
8517+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8518+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
8519+ break;
8520+ case GL_CURRENT_FOG_COORDINATE_EXT:
8521+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8522+ {
8523+ FLUSH_CURRENT(ctx, 0);
8524+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
8525+ }
8526+ break;
8527+ case GL_FOG_COORDINATE_ARRAY_EXT:
8528+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8529+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
8530+ break;
8531+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
8532+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8533+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
8534+ break;
8535+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
8536+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8537+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
8538+ break;
8539+ case GL_FOG_COORDINATE_SOURCE_EXT:
8540+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8541+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
8542+ break;
8543+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
8544+ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
8545+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
8546+ break;
8547+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
8548+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
8549+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
8550+ break;
8551+ case GL_MULTISAMPLE_ARB:
8552+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8553+ params[0] = ctx->Multisample.Enabled;
8554+ break;
8555+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
8556+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8557+ params[0] = ctx->Multisample.SampleAlphaToCoverage;
8558+ break;
8559+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
8560+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8561+ params[0] = ctx->Multisample.SampleAlphaToOne;
8562+ break;
8563+ case GL_SAMPLE_COVERAGE_ARB:
8564+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8565+ params[0] = ctx->Multisample.SampleCoverage;
8566+ break;
8567+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
8568+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8569+ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
8570+ break;
8571+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
8572+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8573+ params[0] = ctx->Multisample.SampleCoverageInvert;
8574+ break;
8575+ case GL_SAMPLE_BUFFERS_ARB:
8576+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8577+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
8578+ break;
8579+ case GL_SAMPLES_ARB:
8580+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8581+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
8582+ break;
8583+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
8584+ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
8585+ params[0] = ctx->Transform.RasterPositionUnclipped;
8586+ break;
8587+ case GL_POINT_SPRITE_NV:
8588+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8589+ params[0] = ctx->Point.PointSprite;
8590+ break;
8591+ case GL_POINT_SPRITE_R_MODE_NV:
8592+ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
8593+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
8594+ break;
8595+ case GL_POINT_SPRITE_COORD_ORIGIN:
8596+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8597+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
8598+ break;
8599+ case GL_GENERATE_MIPMAP_HINT_SGIS:
8600+ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
8601+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
8602+ break;
8603+ case GL_VERTEX_PROGRAM_BINDING_NV:
8604+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8605+ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
8606+ break;
8607+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
8608+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8609+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
8610+ break;
8611+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
8612+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8613+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
8614+ break;
8615+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
8616+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8617+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
8618+ break;
8619+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
8620+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8621+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
8622+ break;
8623+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
8624+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8625+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
8626+ break;
8627+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
8628+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8629+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
8630+ break;
8631+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
8632+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8633+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
8634+ break;
8635+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
8636+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8637+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
8638+ break;
8639+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
8640+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8641+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
8642+ break;
8643+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
8644+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8645+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
8646+ break;
8647+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
8648+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8649+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
8650+ break;
8651+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
8652+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8653+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
8654+ break;
8655+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
8656+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8657+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
8658+ break;
8659+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
8660+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8661+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
8662+ break;
8663+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
8664+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8665+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
8666+ break;
8667+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
8668+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8669+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
8670+ break;
8671+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
8672+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8673+ params[0] = ctx->Eval.Map1Attrib[0];
8674+ break;
8675+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
8676+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8677+ params[0] = ctx->Eval.Map1Attrib[1];
8678+ break;
8679+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
8680+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8681+ params[0] = ctx->Eval.Map1Attrib[2];
8682+ break;
8683+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
8684+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8685+ params[0] = ctx->Eval.Map1Attrib[3];
8686+ break;
8687+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
8688+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8689+ params[0] = ctx->Eval.Map1Attrib[4];
8690+ break;
8691+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
8692+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8693+ params[0] = ctx->Eval.Map1Attrib[5];
8694+ break;
8695+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
8696+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8697+ params[0] = ctx->Eval.Map1Attrib[6];
8698+ break;
8699+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
8700+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8701+ params[0] = ctx->Eval.Map1Attrib[7];
8702+ break;
8703+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
8704+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8705+ params[0] = ctx->Eval.Map1Attrib[8];
8706+ break;
8707+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
8708+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8709+ params[0] = ctx->Eval.Map1Attrib[9];
8710+ break;
8711+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
8712+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8713+ params[0] = ctx->Eval.Map1Attrib[10];
8714+ break;
8715+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
8716+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8717+ params[0] = ctx->Eval.Map1Attrib[11];
8718+ break;
8719+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
8720+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8721+ params[0] = ctx->Eval.Map1Attrib[12];
8722+ break;
8723+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
8724+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8725+ params[0] = ctx->Eval.Map1Attrib[13];
8726+ break;
8727+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
8728+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8729+ params[0] = ctx->Eval.Map1Attrib[14];
8730+ break;
8731+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
8732+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8733+ params[0] = ctx->Eval.Map1Attrib[15];
8734+ break;
8735+ case GL_FRAGMENT_PROGRAM_NV:
8736+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8737+ params[0] = ctx->FragmentProgram.Enabled;
8738+ break;
8739+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
8740+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8741+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
8742+ break;
8743+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
8744+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8745+ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
8746+ break;
8747+ case GL_TEXTURE_RECTANGLE_NV:
8748+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8749+ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
8750+ break;
8751+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
8752+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8753+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
8754+ break;
8755+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
8756+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8757+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
8758+ break;
8759+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
8760+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8761+ params[0] = ctx->Stencil.TestTwoSide;
8762+ break;
8763+ case GL_ACTIVE_STENCIL_FACE_EXT:
8764+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8765+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
8766+ break;
8767+ case GL_MAX_SHININESS_NV:
8768+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8769+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
8770+ break;
8771+ case GL_MAX_SPOT_EXPONENT_NV:
8772+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8773+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
8774+ break;
8775+ case GL_ARRAY_BUFFER_BINDING_ARB:
8776+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8777+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
8778+ break;
8779+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
8780+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8781+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
8782+ break;
8783+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
8784+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8785+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
8786+ break;
8787+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
8788+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8789+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
8790+ break;
8791+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
8792+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8793+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
8794+ break;
8795+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
8796+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8797+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
8798+ break;
8799+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
8800+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8801+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
8802+ break;
8803+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
8804+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8805+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
8806+ break;
8807+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
8808+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8809+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
8810+ break;
8811+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
8812+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8813+ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
8814+ break;
8815+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
8816+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8817+ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
8818+ break;
8819+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
8820+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8821+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
8822+ break;
8823+ case GL_VERTEX_PROGRAM_ARB:
8824+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8825+ params[0] = ctx->VertexProgram.Enabled;
8826+ break;
8827+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
8828+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8829+ params[0] = ctx->VertexProgram.PointSizeEnabled;
8830+ break;
8831+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
8832+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8833+ params[0] = ctx->VertexProgram.TwoSideEnabled;
8834+ break;
8835+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
8836+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8837+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
8838+ break;
8839+ case GL_MAX_PROGRAM_MATRICES_ARB:
8840+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8841+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
8842+ break;
8843+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
8844+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8845+ params[0] = ctx->CurrentStack->Depth + 1;
8846+ break;
8847+ case GL_CURRENT_MATRIX_ARB:
8848+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8849+ {
8850+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8851+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8852+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8853+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8854+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8855+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8856+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8857+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8858+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8859+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8860+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8861+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8862+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8863+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8864+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8865+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8866+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8867+ }
8868+ break;
8869+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
8870+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
8871+ {
8872+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8873+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8874+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8875+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8876+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8877+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8878+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8879+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8880+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8881+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8882+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8883+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8884+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8885+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8886+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8887+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8888+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8889+ }
8890+ break;
8891+ case GL_MAX_VERTEX_ATTRIBS_ARB:
8892+ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
8893+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
8894+ break;
8895+ case GL_PROGRAM_ERROR_POSITION_ARB:
8896+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
8897+ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
8898+ break;
8899+ case GL_FRAGMENT_PROGRAM_ARB:
8900+ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
8901+ params[0] = ctx->FragmentProgram.Enabled;
8902+ break;
8903+ case GL_MAX_TEXTURE_COORDS_ARB:
8904+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8905+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
8906+ break;
8907+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
8908+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8909+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
8910+ break;
8911+ case GL_DEPTH_BOUNDS_TEST_EXT:
8912+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8913+ params[0] = ctx->Depth.BoundsTest;
8914+ break;
8915+ case GL_DEPTH_BOUNDS_EXT:
8916+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8917+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
8918+ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
8919+ break;
8920+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
8921+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8922+ params[0] = ctx->FragmentProgram.CallbackEnabled;
8923+ break;
8924+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
8925+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8926+ params[0] = ctx->VertexProgram.CallbackEnabled;
8927+ break;
8928+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
8929+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8930+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
8931+ break;
8932+ case GL_VERTEX_PROGRAM_POSITION_MESA:
8933+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8934+ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
8935+ break;
8936+ case GL_MAX_DRAW_BUFFERS_ARB:
8937+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8938+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
8939+ break;
8940+ case GL_DRAW_BUFFER0_ARB:
8941+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8942+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
8943+ break;
8944+ case GL_DRAW_BUFFER1_ARB:
8945+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8946+ {
8947+ GLenum buffer;
8948+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8949+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8950+ return;
8951+ }
8952+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
8953+ params[0] = ENUM_TO_BOOLEAN(buffer);
8954+ }
8955+ break;
8956+ case GL_DRAW_BUFFER2_ARB:
8957+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8958+ {
8959+ GLenum buffer;
8960+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8961+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8962+ return;
8963+ }
8964+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
8965+ params[0] = ENUM_TO_BOOLEAN(buffer);
8966+ }
8967+ break;
8968+ case GL_DRAW_BUFFER3_ARB:
8969+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8970+ {
8971+ GLenum buffer;
8972+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8973+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8974+ return;
8975+ }
8976+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
8977+ params[0] = ENUM_TO_BOOLEAN(buffer);
8978+ }
8979+ break;
8980+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
8981+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8982+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
8983+ break;
8984+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
8985+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8986+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
8987+ break;
8988+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
8989+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8990+ params[0] = INT_TO_BOOLEAN(6);
8991+ break;
8992+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
8993+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8994+ params[0] = INT_TO_BOOLEAN(8);
8995+ break;
8996+ case GL_NUM_PASSES_ATI:
8997+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8998+ params[0] = INT_TO_BOOLEAN(2);
8999+ break;
9000+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
9001+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
9002+ params[0] = INT_TO_BOOLEAN(8);
9003+ break;
9004+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
9005+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
9006+ params[0] = INT_TO_BOOLEAN(16);
9007+ break;
9008+ case GL_COLOR_ALPHA_PAIRING_ATI:
9009+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
9010+ params[0] = GL_TRUE;
9011+ break;
9012+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
9013+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
9014+ params[0] = INT_TO_BOOLEAN(3);
9015+ break;
9016+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
9017+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
9018+ params[0] = INT_TO_BOOLEAN(3);
9019+ break;
9020+ case GL_STENCIL_BACK_FUNC:
9021+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
9022+ break;
9023+ case GL_STENCIL_BACK_VALUE_MASK:
9024+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
9025+ break;
9026+ case GL_STENCIL_BACK_REF:
9027+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
9028+ break;
9029+ case GL_STENCIL_BACK_FAIL:
9030+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
9031+ break;
9032+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
9033+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
9034+ break;
9035+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
9036+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
9037+ break;
9038+ case GL_FRAMEBUFFER_BINDING_EXT:
9039+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
9040+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
9041+ break;
9042+ case GL_RENDERBUFFER_BINDING_EXT:
9043+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
9044+ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
9045+ break;
9046+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
9047+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
9048+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
9049+ break;
9050+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
9051+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
9052+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
9053+ break;
9054+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
9055+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
9056+ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
9057+ break;
9058+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
9059+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
9060+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
9061+ break;
9062+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
9063+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9064+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
9065+ break;
9066+ case GL_MAX_VARYING_FLOATS_ARB:
9067+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9068+ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
9069+ break;
9070+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
9071+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9072+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
9073+ break;
9074+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
9075+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9076+ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
9077+ break;
9078+ default:
9079+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
9080+ }
9081+}
9082+
9083+void GLAPIENTRY
9084+_mesa_GetFloatv( GLenum pname, GLfloat *params )
9085+{
9086+ GET_CURRENT_CONTEXT(ctx);
9087+ ASSERT_OUTSIDE_BEGIN_END(ctx);
9088+
9089+ if (!params)
9090+ return;
9091+
9092+ if (ctx->NewState)
9093+ _mesa_update_state(ctx);
9094+
9095+ if (ctx->Driver.GetFloatv &&
9096+ ctx->Driver.GetFloatv(ctx, pname, params))
9097+ return;
9098+
9099+ switch (pname) {
9100+ case GL_ACCUM_RED_BITS:
9101+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
9102+ break;
9103+ case GL_ACCUM_GREEN_BITS:
9104+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
9105+ break;
9106+ case GL_ACCUM_BLUE_BITS:
9107+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
9108+ break;
9109+ case GL_ACCUM_ALPHA_BITS:
9110+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
9111+ break;
9112+ case GL_ACCUM_CLEAR_VALUE:
9113+ params[0] = ctx->Accum.ClearColor[0];
9114+ params[1] = ctx->Accum.ClearColor[1];
9115+ params[2] = ctx->Accum.ClearColor[2];
9116+ params[3] = ctx->Accum.ClearColor[3];
9117+ break;
9118+ case GL_ALPHA_BIAS:
9119+ params[0] = ctx->Pixel.AlphaBias;
9120+ break;
9121+ case GL_ALPHA_BITS:
9122+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
9123+ break;
9124+ case GL_ALPHA_SCALE:
9125+ params[0] = ctx->Pixel.AlphaScale;
9126+ break;
9127+ case GL_ALPHA_TEST:
9128+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
9129+ break;
9130+ case GL_ALPHA_TEST_FUNC:
9131+ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
9132+ break;
9133+ case GL_ALPHA_TEST_REF:
9134+ params[0] = ctx->Color.AlphaRef;
9135+ break;
9136+ case GL_ATTRIB_STACK_DEPTH:
9137+ params[0] = (GLfloat)(ctx->AttribStackDepth);
9138+ break;
9139+ case GL_AUTO_NORMAL:
9140+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
9141+ break;
9142+ case GL_AUX_BUFFERS:
9143+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
9144+ break;
9145+ case GL_BLEND:
9146+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
9147+ break;
9148+ case GL_BLEND_DST:
9149+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
9150+ break;
9151+ case GL_BLEND_SRC:
9152+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
9153+ break;
9154+ case GL_BLEND_SRC_RGB_EXT:
9155+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
9156+ break;
9157+ case GL_BLEND_DST_RGB_EXT:
9158+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
9159+ break;
9160+ case GL_BLEND_SRC_ALPHA_EXT:
9161+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
9162+ break;
9163+ case GL_BLEND_DST_ALPHA_EXT:
9164+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
9165+ break;
9166+ case GL_BLEND_EQUATION:
9167+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
9168+ break;
9169+ case GL_BLEND_EQUATION_ALPHA_EXT:
9170+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
9171+ break;
9172+ case GL_BLEND_COLOR_EXT:
9173+ params[0] = ctx->Color.BlendColor[0];
9174+ params[1] = ctx->Color.BlendColor[1];
9175+ params[2] = ctx->Color.BlendColor[2];
9176+ params[3] = ctx->Color.BlendColor[3];
9177+ break;
9178+ case GL_BLUE_BIAS:
9179+ params[0] = ctx->Pixel.BlueBias;
9180+ break;
9181+ case GL_BLUE_BITS:
9182+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
9183+ break;
9184+ case GL_BLUE_SCALE:
9185+ params[0] = ctx->Pixel.BlueScale;
9186+ break;
9187+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
9188+ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
9189+ break;
9190+ case GL_CLIP_PLANE0:
9191+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
9192+ break;
9193+ case GL_CLIP_PLANE1:
9194+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
9195+ break;
9196+ case GL_CLIP_PLANE2:
9197+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
9198+ break;
9199+ case GL_CLIP_PLANE3:
9200+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
9201+ break;
9202+ case GL_CLIP_PLANE4:
9203+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
9204+ break;
9205+ case GL_CLIP_PLANE5:
9206+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
9207+ break;
9208+ case GL_COLOR_CLEAR_VALUE:
9209+ params[0] = ctx->Color.ClearColor[0];
9210+ params[1] = ctx->Color.ClearColor[1];
9211+ params[2] = ctx->Color.ClearColor[2];
9212+ params[3] = ctx->Color.ClearColor[3];
9213+ break;
9214+ case GL_COLOR_MATERIAL:
9215+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
9216+ break;
9217+ case GL_COLOR_MATERIAL_FACE:
9218+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
9219+ break;
9220+ case GL_COLOR_MATERIAL_PARAMETER:
9221+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
9222+ break;
9223+ case GL_COLOR_WRITEMASK:
9224+ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
9225+ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
9226+ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
9227+ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
9228+ break;
9229+ case GL_CULL_FACE:
9230+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
9231+ break;
9232+ case GL_CULL_FACE_MODE:
9233+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
9234+ break;
9235+ case GL_CURRENT_COLOR:
9236+ {
9237+ FLUSH_CURRENT(ctx, 0);
9238+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
9239+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
9240+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
9241+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
9242+ }
9243+ break;
9244+ case GL_CURRENT_INDEX:
9245+ {
9246+ FLUSH_CURRENT(ctx, 0);
9247+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
9248+ }
9249+ break;
9250+ case GL_CURRENT_NORMAL:
9251+ {
9252+ FLUSH_CURRENT(ctx, 0);
9253+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
9254+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
9255+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
9256+ }
9257+ break;
9258+ case GL_CURRENT_RASTER_COLOR:
9259+ params[0] = ctx->Current.RasterColor[0];
9260+ params[1] = ctx->Current.RasterColor[1];
9261+ params[2] = ctx->Current.RasterColor[2];
9262+ params[3] = ctx->Current.RasterColor[3];
9263+ break;
9264+ case GL_CURRENT_RASTER_DISTANCE:
9265+ params[0] = ctx->Current.RasterDistance;
9266+ break;
9267+ case GL_CURRENT_RASTER_INDEX:
9268+ params[0] = ctx->Current.RasterIndex;
9269+ break;
9270+ case GL_CURRENT_RASTER_POSITION:
9271+ params[0] = ctx->Current.RasterPos[0];
9272+ params[1] = ctx->Current.RasterPos[1];
9273+ params[2] = ctx->Current.RasterPos[2];
9274+ params[3] = ctx->Current.RasterPos[3];
9275+ break;
9276+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
9277+ params[0] = ctx->Current.RasterSecondaryColor[0];
9278+ params[1] = ctx->Current.RasterSecondaryColor[1];
9279+ params[2] = ctx->Current.RasterSecondaryColor[2];
9280+ params[3] = ctx->Current.RasterSecondaryColor[3];
9281+ break;
9282+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
9283+ {
9284+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9285+ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
9286+ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
9287+ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
9288+ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
9289+ }
9290+ break;
9291+ case GL_CURRENT_RASTER_POSITION_VALID:
9292+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
9293+ break;
9294+ case GL_CURRENT_TEXTURE_COORDS:
9295+ {
9296+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9297+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
9298+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
9299+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
9300+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
9301+ }
9302+ break;
9303+ case GL_DEPTH_BIAS:
9304+ params[0] = ctx->Pixel.DepthBias;
9305+ break;
9306+ case GL_DEPTH_BITS:
9307+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
9308+ break;
9309+ case GL_DEPTH_CLEAR_VALUE:
9310+ params[0] = ctx->Depth.Clear;
9311+ break;
9312+ case GL_DEPTH_FUNC:
9313+ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
9314+ break;
9315+ case GL_DEPTH_RANGE:
9316+ params[0] = ctx->Viewport.Near;
9317+ params[1] = ctx->Viewport.Far;
9318+ break;
9319+ case GL_DEPTH_SCALE:
9320+ params[0] = ctx->Pixel.DepthScale;
9321+ break;
9322+ case GL_DEPTH_TEST:
9323+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
9324+ break;
9325+ case GL_DEPTH_WRITEMASK:
9326+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
9327+ break;
9328+ case GL_DITHER:
9329+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
9330+ break;
9331+ case GL_DOUBLEBUFFER:
9332+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
9333+ break;
9334+ case GL_DRAW_BUFFER:
9335+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
9336+ break;
9337+ case GL_EDGE_FLAG:
9338+ {
9339+ FLUSH_CURRENT(ctx, 0);
9340+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
9341+ }
9342+ break;
9343+ case GL_FEEDBACK_BUFFER_SIZE:
9344+ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
9345+ break;
9346+ case GL_FEEDBACK_BUFFER_TYPE:
9347+ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
9348+ break;
9349+ case GL_FOG:
9350+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
9351+ break;
9352+ case GL_FOG_COLOR:
9353+ params[0] = ctx->Fog.Color[0];
9354+ params[1] = ctx->Fog.Color[1];
9355+ params[2] = ctx->Fog.Color[2];
9356+ params[3] = ctx->Fog.Color[3];
9357+ break;
9358+ case GL_FOG_DENSITY:
9359+ params[0] = ctx->Fog.Density;
9360+ break;
9361+ case GL_FOG_END:
9362+ params[0] = ctx->Fog.End;
9363+ break;
9364+ case GL_FOG_HINT:
9365+ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
9366+ break;
9367+ case GL_FOG_INDEX:
9368+ params[0] = ctx->Fog.Index;
9369+ break;
9370+ case GL_FOG_MODE:
9371+ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
9372+ break;
9373+ case GL_FOG_START:
9374+ params[0] = ctx->Fog.Start;
9375+ break;
9376+ case GL_FRONT_FACE:
9377+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
9378+ break;
9379+ case GL_GREEN_BIAS:
9380+ params[0] = ctx->Pixel.GreenBias;
9381+ break;
9382+ case GL_GREEN_BITS:
9383+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
9384+ break;
9385+ case GL_GREEN_SCALE:
9386+ params[0] = ctx->Pixel.GreenScale;
9387+ break;
9388+ case GL_INDEX_BITS:
9389+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
9390+ break;
9391+ case GL_INDEX_CLEAR_VALUE:
9392+ params[0] = (GLfloat)(ctx->Color.ClearIndex);
9393+ break;
9394+ case GL_INDEX_MODE:
9395+ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
9396+ break;
9397+ case GL_INDEX_OFFSET:
9398+ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
9399+ break;
9400+ case GL_INDEX_SHIFT:
9401+ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
9402+ break;
9403+ case GL_INDEX_WRITEMASK:
9404+ params[0] = (GLfloat)(ctx->Color.IndexMask);
9405+ break;
9406+ case GL_LIGHT0:
9407+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
9408+ break;
9409+ case GL_LIGHT1:
9410+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
9411+ break;
9412+ case GL_LIGHT2:
9413+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
9414+ break;
9415+ case GL_LIGHT3:
9416+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
9417+ break;
9418+ case GL_LIGHT4:
9419+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
9420+ break;
9421+ case GL_LIGHT5:
9422+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
9423+ break;
9424+ case GL_LIGHT6:
9425+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
9426+ break;
9427+ case GL_LIGHT7:
9428+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
9429+ break;
9430+ case GL_LIGHTING:
9431+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
9432+ break;
9433+ case GL_LIGHT_MODEL_AMBIENT:
9434+ params[0] = ctx->Light.Model.Ambient[0];
9435+ params[1] = ctx->Light.Model.Ambient[1];
9436+ params[2] = ctx->Light.Model.Ambient[2];
9437+ params[3] = ctx->Light.Model.Ambient[3];
9438+ break;
9439+ case GL_LIGHT_MODEL_COLOR_CONTROL:
9440+ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
9441+ break;
9442+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
9443+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
9444+ break;
9445+ case GL_LIGHT_MODEL_TWO_SIDE:
9446+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
9447+ break;
9448+ case GL_LINE_SMOOTH:
9449+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
9450+ break;
9451+ case GL_LINE_SMOOTH_HINT:
9452+ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
9453+ break;
9454+ case GL_LINE_STIPPLE:
9455+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
9456+ break;
9457+ case GL_LINE_STIPPLE_PATTERN:
9458+ params[0] = (GLfloat)(ctx->Line.StipplePattern);
9459+ break;
9460+ case GL_LINE_STIPPLE_REPEAT:
9461+ params[0] = (GLfloat)(ctx->Line.StippleFactor);
9462+ break;
9463+ case GL_LINE_WIDTH:
9464+ params[0] = ctx->Line.Width;
9465+ break;
9466+ case GL_LINE_WIDTH_GRANULARITY:
9467+ params[0] = ctx->Const.LineWidthGranularity;
9468+ break;
9469+ case GL_LINE_WIDTH_RANGE:
9470+ params[0] = ctx->Const.MinLineWidthAA;
9471+ params[1] = ctx->Const.MaxLineWidthAA;
9472+ break;
9473+ case GL_ALIASED_LINE_WIDTH_RANGE:
9474+ params[0] = ctx->Const.MinLineWidth;
9475+ params[1] = ctx->Const.MaxLineWidth;
9476+ break;
9477+ case GL_LIST_BASE:
9478+ params[0] = (GLfloat)(ctx->List.ListBase);
9479+ break;
9480+ case GL_LIST_INDEX:
9481+ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
9482+ break;
9483+ case GL_LIST_MODE:
9484+ {
9485+ GLenum mode;
9486+ if (!ctx->CompileFlag)
9487+ mode = 0;
9488+ else if (ctx->ExecuteFlag)
9489+ mode = GL_COMPILE_AND_EXECUTE;
9490+ else
9491+ mode = GL_COMPILE;
9492+ params[0] = ENUM_TO_FLOAT(mode);
9493+ }
9494+ break;
9495+ case GL_INDEX_LOGIC_OP:
9496+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
9497+ break;
9498+ case GL_COLOR_LOGIC_OP:
9499+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
9500+ break;
9501+ case GL_LOGIC_OP_MODE:
9502+ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
9503+ break;
9504+ case GL_MAP1_COLOR_4:
9505+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
9506+ break;
9507+ case GL_MAP1_GRID_DOMAIN:
9508+ params[0] = ctx->Eval.MapGrid1u1;
9509+ params[1] = ctx->Eval.MapGrid1u2;
9510+ break;
9511+ case GL_MAP1_GRID_SEGMENTS:
9512+ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
9513+ break;
9514+ case GL_MAP1_INDEX:
9515+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
9516+ break;
9517+ case GL_MAP1_NORMAL:
9518+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
9519+ break;
9520+ case GL_MAP1_TEXTURE_COORD_1:
9521+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
9522+ break;
9523+ case GL_MAP1_TEXTURE_COORD_2:
9524+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
9525+ break;
9526+ case GL_MAP1_TEXTURE_COORD_3:
9527+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
9528+ break;
9529+ case GL_MAP1_TEXTURE_COORD_4:
9530+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
9531+ break;
9532+ case GL_MAP1_VERTEX_3:
9533+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
9534+ break;
9535+ case GL_MAP1_VERTEX_4:
9536+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
9537+ break;
9538+ case GL_MAP2_COLOR_4:
9539+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
9540+ break;
9541+ case GL_MAP2_GRID_DOMAIN:
9542+ params[0] = ctx->Eval.MapGrid2u1;
9543+ params[1] = ctx->Eval.MapGrid2u2;
9544+ params[2] = ctx->Eval.MapGrid2v1;
9545+ params[3] = ctx->Eval.MapGrid2v2;
9546+ break;
9547+ case GL_MAP2_GRID_SEGMENTS:
9548+ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
9549+ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
9550+ break;
9551+ case GL_MAP2_INDEX:
9552+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
9553+ break;
9554+ case GL_MAP2_NORMAL:
9555+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
9556+ break;
9557+ case GL_MAP2_TEXTURE_COORD_1:
9558+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
9559+ break;
9560+ case GL_MAP2_TEXTURE_COORD_2:
9561+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
9562+ break;
9563+ case GL_MAP2_TEXTURE_COORD_3:
9564+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
9565+ break;
9566+ case GL_MAP2_TEXTURE_COORD_4:
9567+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
9568+ break;
9569+ case GL_MAP2_VERTEX_3:
9570+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
9571+ break;
9572+ case GL_MAP2_VERTEX_4:
9573+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
9574+ break;
9575+ case GL_MAP_COLOR:
9576+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
9577+ break;
9578+ case GL_MAP_STENCIL:
9579+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
9580+ break;
9581+ case GL_MATRIX_MODE:
9582+ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
9583+ break;
9584+ case GL_MAX_ATTRIB_STACK_DEPTH:
9585+ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
9586+ break;
9587+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
9588+ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
9589+ break;
9590+ case GL_MAX_CLIP_PLANES:
9591+ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
9592+ break;
9593+ case GL_MAX_ELEMENTS_VERTICES:
9594+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9595+ break;
9596+ case GL_MAX_ELEMENTS_INDICES:
9597+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9598+ break;
9599+ case GL_MAX_EVAL_ORDER:
9600+ params[0] = (GLfloat)(MAX_EVAL_ORDER);
9601+ break;
9602+ case GL_MAX_LIGHTS:
9603+ params[0] = (GLfloat)(ctx->Const.MaxLights);
9604+ break;
9605+ case GL_MAX_LIST_NESTING:
9606+ params[0] = (GLfloat)(MAX_LIST_NESTING);
9607+ break;
9608+ case GL_MAX_MODELVIEW_STACK_DEPTH:
9609+ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
9610+ break;
9611+ case GL_MAX_NAME_STACK_DEPTH:
9612+ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
9613+ break;
9614+ case GL_MAX_PIXEL_MAP_TABLE:
9615+ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
9616+ break;
9617+ case GL_MAX_PROJECTION_STACK_DEPTH:
9618+ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
9619+ break;
9620+ case GL_MAX_TEXTURE_SIZE:
9621+ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
9622+ break;
9623+ case GL_MAX_3D_TEXTURE_SIZE:
9624+ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
9625+ break;
9626+ case GL_MAX_TEXTURE_STACK_DEPTH:
9627+ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
9628+ break;
9629+ case GL_MAX_VIEWPORT_DIMS:
9630+ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
9631+ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
9632+ break;
9633+ case GL_MODELVIEW_MATRIX:
9634+ {
9635+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9636+ params[0] = matrix[0];
9637+ params[1] = matrix[1];
9638+ params[2] = matrix[2];
9639+ params[3] = matrix[3];
9640+ params[4] = matrix[4];
9641+ params[5] = matrix[5];
9642+ params[6] = matrix[6];
9643+ params[7] = matrix[7];
9644+ params[8] = matrix[8];
9645+ params[9] = matrix[9];
9646+ params[10] = matrix[10];
9647+ params[11] = matrix[11];
9648+ params[12] = matrix[12];
9649+ params[13] = matrix[13];
9650+ params[14] = matrix[14];
9651+ params[15] = matrix[15];
9652+ }
9653+ break;
9654+ case GL_MODELVIEW_STACK_DEPTH:
9655+ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
9656+ break;
9657+ case GL_NAME_STACK_DEPTH:
9658+ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
9659+ break;
9660+ case GL_NORMALIZE:
9661+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
9662+ break;
9663+ case GL_PACK_ALIGNMENT:
9664+ params[0] = (GLfloat)(ctx->Pack.Alignment);
9665+ break;
9666+ case GL_PACK_LSB_FIRST:
9667+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
9668+ break;
9669+ case GL_PACK_ROW_LENGTH:
9670+ params[0] = (GLfloat)(ctx->Pack.RowLength);
9671+ break;
9672+ case GL_PACK_SKIP_PIXELS:
9673+ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
9674+ break;
9675+ case GL_PACK_SKIP_ROWS:
9676+ params[0] = (GLfloat)(ctx->Pack.SkipRows);
9677+ break;
9678+ case GL_PACK_SWAP_BYTES:
9679+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
9680+ break;
9681+ case GL_PACK_SKIP_IMAGES_EXT:
9682+ params[0] = (GLfloat)(ctx->Pack.SkipImages);
9683+ break;
9684+ case GL_PACK_IMAGE_HEIGHT_EXT:
9685+ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
9686+ break;
9687+ case GL_PACK_INVERT_MESA:
9688+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
9689+ break;
9690+ case GL_PERSPECTIVE_CORRECTION_HINT:
9691+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
9692+ break;
9693+ case GL_PIXEL_MAP_A_TO_A_SIZE:
9694+ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
9695+ break;
9696+ case GL_PIXEL_MAP_B_TO_B_SIZE:
9697+ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
9698+ break;
9699+ case GL_PIXEL_MAP_G_TO_G_SIZE:
9700+ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
9701+ break;
9702+ case GL_PIXEL_MAP_I_TO_A_SIZE:
9703+ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
9704+ break;
9705+ case GL_PIXEL_MAP_I_TO_B_SIZE:
9706+ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
9707+ break;
9708+ case GL_PIXEL_MAP_I_TO_G_SIZE:
9709+ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
9710+ break;
9711+ case GL_PIXEL_MAP_I_TO_I_SIZE:
9712+ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
9713+ break;
9714+ case GL_PIXEL_MAP_I_TO_R_SIZE:
9715+ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
9716+ break;
9717+ case GL_PIXEL_MAP_R_TO_R_SIZE:
9718+ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
9719+ break;
9720+ case GL_PIXEL_MAP_S_TO_S_SIZE:
9721+ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
9722+ break;
9723+ case GL_POINT_SIZE:
9724+ params[0] = ctx->Point.Size;
9725+ break;
9726+ case GL_POINT_SIZE_GRANULARITY:
9727+ params[0] = ctx->Const.PointSizeGranularity;
9728+ break;
9729+ case GL_POINT_SIZE_RANGE:
9730+ params[0] = ctx->Const.MinPointSizeAA;
9731+ params[1] = ctx->Const.MaxPointSizeAA;
9732+ break;
9733+ case GL_ALIASED_POINT_SIZE_RANGE:
9734+ params[0] = ctx->Const.MinPointSize;
9735+ params[1] = ctx->Const.MaxPointSize;
9736+ break;
9737+ case GL_POINT_SMOOTH:
9738+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
9739+ break;
9740+ case GL_POINT_SMOOTH_HINT:
9741+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
9742+ break;
9743+ case GL_POINT_SIZE_MIN_EXT:
9744+ params[0] = ctx->Point.MinSize;
9745+ break;
9746+ case GL_POINT_SIZE_MAX_EXT:
9747+ params[0] = ctx->Point.MaxSize;
9748+ break;
9749+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
9750+ params[0] = ctx->Point.Threshold;
9751+ break;
9752+ case GL_DISTANCE_ATTENUATION_EXT:
9753+ params[0] = ctx->Point.Params[0];
9754+ params[1] = ctx->Point.Params[1];
9755+ params[2] = ctx->Point.Params[2];
9756+ break;
9757+ case GL_POLYGON_MODE:
9758+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
9759+ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
9760+ break;
9761+ case GL_POLYGON_OFFSET_BIAS_EXT:
9762+ params[0] = ctx->Polygon.OffsetUnits;
9763+ break;
9764+ case GL_POLYGON_OFFSET_FACTOR:
9765+ params[0] = ctx->Polygon.OffsetFactor ;
9766+ break;
9767+ case GL_POLYGON_OFFSET_UNITS:
9768+ params[0] = ctx->Polygon.OffsetUnits ;
9769+ break;
9770+ case GL_POLYGON_SMOOTH:
9771+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
9772+ break;
9773+ case GL_POLYGON_SMOOTH_HINT:
9774+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
9775+ break;
9776+ case GL_POLYGON_STIPPLE:
9777+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
9778+ break;
9779+ case GL_PROJECTION_MATRIX:
9780+ {
9781+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9782+ params[0] = matrix[0];
9783+ params[1] = matrix[1];
9784+ params[2] = matrix[2];
9785+ params[3] = matrix[3];
9786+ params[4] = matrix[4];
9787+ params[5] = matrix[5];
9788+ params[6] = matrix[6];
9789+ params[7] = matrix[7];
9790+ params[8] = matrix[8];
9791+ params[9] = matrix[9];
9792+ params[10] = matrix[10];
9793+ params[11] = matrix[11];
9794+ params[12] = matrix[12];
9795+ params[13] = matrix[13];
9796+ params[14] = matrix[14];
9797+ params[15] = matrix[15];
9798+ }
9799+ break;
9800+ case GL_PROJECTION_STACK_DEPTH:
9801+ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
9802+ break;
9803+ case GL_READ_BUFFER:
9804+ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
9805+ break;
9806+ case GL_RED_BIAS:
9807+ params[0] = ctx->Pixel.RedBias;
9808+ break;
9809+ case GL_RED_BITS:
9810+ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
9811+ break;
9812+ case GL_RED_SCALE:
9813+ params[0] = ctx->Pixel.RedScale;
9814+ break;
9815+ case GL_RENDER_MODE:
9816+ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
9817+ break;
9818+ case GL_RESCALE_NORMAL:
9819+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
9820+ break;
9821+ case GL_RGBA_MODE:
9822+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
9823+ break;
9824+ case GL_SCISSOR_BOX:
9825+ params[0] = (GLfloat)(ctx->Scissor.X);
9826+ params[1] = (GLfloat)(ctx->Scissor.Y);
9827+ params[2] = (GLfloat)(ctx->Scissor.Width);
9828+ params[3] = (GLfloat)(ctx->Scissor.Height);
9829+ break;
9830+ case GL_SCISSOR_TEST:
9831+ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
9832+ break;
9833+ case GL_SELECTION_BUFFER_SIZE:
9834+ params[0] = (GLfloat)(ctx->Select.BufferSize);
9835+ break;
9836+ case GL_SHADE_MODEL:
9837+ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
9838+ break;
9839+ case GL_SHARED_TEXTURE_PALETTE_EXT:
9840+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
9841+ break;
9842+ case GL_STENCIL_BITS:
9843+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
9844+ break;
9845+ case GL_STENCIL_CLEAR_VALUE:
9846+ params[0] = (GLfloat)(ctx->Stencil.Clear);
9847+ break;
9848+ case GL_STENCIL_FAIL:
9849+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
9850+ break;
9851+ case GL_STENCIL_FUNC:
9852+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
9853+ break;
9854+ case GL_STENCIL_PASS_DEPTH_FAIL:
9855+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
9856+ break;
9857+ case GL_STENCIL_PASS_DEPTH_PASS:
9858+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
9859+ break;
9860+ case GL_STENCIL_REF:
9861+ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
9862+ break;
9863+ case GL_STENCIL_TEST:
9864+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
9865+ break;
9866+ case GL_STENCIL_VALUE_MASK:
9867+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
9868+ break;
9869+ case GL_STENCIL_WRITEMASK:
9870+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
9871+ break;
9872+ case GL_STEREO:
9873+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
9874+ break;
9875+ case GL_SUBPIXEL_BITS:
9876+ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
9877+ break;
9878+ case GL_TEXTURE_1D:
9879+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
9880+ break;
9881+ case GL_TEXTURE_2D:
9882+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
9883+ break;
9884+ case GL_TEXTURE_3D:
9885+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
9886+ break;
9887+ case GL_TEXTURE_BINDING_1D:
9888+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
9889+ break;
9890+ case GL_TEXTURE_BINDING_2D:
9891+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
9892+ break;
9893+ case GL_TEXTURE_BINDING_3D:
9894+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
9895+ break;
9896+ case GL_TEXTURE_ENV_COLOR:
9897+ {
9898+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
9899+ params[0] = color[0];
9900+ params[1] = color[1];
9901+ params[2] = color[2];
9902+ params[3] = color[3];
9903+ }
9904+ break;
9905+ case GL_TEXTURE_ENV_MODE:
9906+ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
9907+ break;
9908+ case GL_TEXTURE_GEN_S:
9909+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
9910+ break;
9911+ case GL_TEXTURE_GEN_T:
9912+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
9913+ break;
9914+ case GL_TEXTURE_GEN_R:
9915+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
9916+ break;
9917+ case GL_TEXTURE_GEN_Q:
9918+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
9919+ break;
9920+ case GL_TEXTURE_MATRIX:
9921+ {
9922+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9923+ params[0] = matrix[0];
9924+ params[1] = matrix[1];
9925+ params[2] = matrix[2];
9926+ params[3] = matrix[3];
9927+ params[4] = matrix[4];
9928+ params[5] = matrix[5];
9929+ params[6] = matrix[6];
9930+ params[7] = matrix[7];
9931+ params[8] = matrix[8];
9932+ params[9] = matrix[9];
9933+ params[10] = matrix[10];
9934+ params[11] = matrix[11];
9935+ params[12] = matrix[12];
9936+ params[13] = matrix[13];
9937+ params[14] = matrix[14];
9938+ params[15] = matrix[15];
9939+ }
9940+ break;
9941+ case GL_TEXTURE_STACK_DEPTH:
9942+ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
9943+ break;
9944+ case GL_UNPACK_ALIGNMENT:
9945+ params[0] = (GLfloat)(ctx->Unpack.Alignment);
9946+ break;
9947+ case GL_UNPACK_LSB_FIRST:
9948+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
9949+ break;
9950+ case GL_UNPACK_ROW_LENGTH:
9951+ params[0] = (GLfloat)(ctx->Unpack.RowLength);
9952+ break;
9953+ case GL_UNPACK_SKIP_PIXELS:
9954+ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
9955+ break;
9956+ case GL_UNPACK_SKIP_ROWS:
9957+ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
9958+ break;
9959+ case GL_UNPACK_SWAP_BYTES:
9960+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
9961+ break;
9962+ case GL_UNPACK_SKIP_IMAGES_EXT:
9963+ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
9964+ break;
9965+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
9966+ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
9967+ break;
9968+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
9969+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
9970+ break;
9971+ case GL_VIEWPORT:
9972+ params[0] = (GLfloat)(ctx->Viewport.X);
9973+ params[1] = (GLfloat)(ctx->Viewport.Y);
9974+ params[2] = (GLfloat)(ctx->Viewport.Width);
9975+ params[3] = (GLfloat)(ctx->Viewport.Height);
9976+ break;
9977+ case GL_ZOOM_X:
9978+ params[0] = ctx->Pixel.ZoomX;
9979+ break;
9980+ case GL_ZOOM_Y:
9981+ params[0] = ctx->Pixel.ZoomY;
9982+ break;
9983+ case GL_VERTEX_ARRAY:
9984+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
9985+ break;
9986+ case GL_VERTEX_ARRAY_SIZE:
9987+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
9988+ break;
9989+ case GL_VERTEX_ARRAY_TYPE:
9990+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
9991+ break;
9992+ case GL_VERTEX_ARRAY_STRIDE:
9993+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
9994+ break;
9995+ case GL_VERTEX_ARRAY_COUNT_EXT:
9996+ params[0] = (GLfloat)(0);
9997+ break;
9998+ case GL_NORMAL_ARRAY:
9999+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
10000+ break;
10001+ case GL_NORMAL_ARRAY_TYPE:
10002+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
10003+ break;
10004+ case GL_NORMAL_ARRAY_STRIDE:
10005+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
10006+ break;
10007+ case GL_NORMAL_ARRAY_COUNT_EXT:
10008+ params[0] = (GLfloat)(0);
10009+ break;
10010+ case GL_COLOR_ARRAY:
10011+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
10012+ break;
10013+ case GL_COLOR_ARRAY_SIZE:
10014+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
10015+ break;
10016+ case GL_COLOR_ARRAY_TYPE:
10017+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
10018+ break;
10019+ case GL_COLOR_ARRAY_STRIDE:
10020+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
10021+ break;
10022+ case GL_COLOR_ARRAY_COUNT_EXT:
10023+ params[0] = (GLfloat)(0);
10024+ break;
10025+ case GL_INDEX_ARRAY:
10026+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
10027+ break;
10028+ case GL_INDEX_ARRAY_TYPE:
10029+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
10030+ break;
10031+ case GL_INDEX_ARRAY_STRIDE:
10032+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
10033+ break;
10034+ case GL_INDEX_ARRAY_COUNT_EXT:
10035+ params[0] = (GLfloat)(0);
10036+ break;
10037+ case GL_TEXTURE_COORD_ARRAY:
10038+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
10039+ break;
10040+ case GL_TEXTURE_COORD_ARRAY_SIZE:
10041+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
10042+ break;
10043+ case GL_TEXTURE_COORD_ARRAY_TYPE:
10044+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
10045+ break;
10046+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
10047+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
10048+ break;
10049+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
10050+ params[0] = (GLfloat)(0);
10051+ break;
10052+ case GL_EDGE_FLAG_ARRAY:
10053+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
10054+ break;
10055+ case GL_EDGE_FLAG_ARRAY_STRIDE:
10056+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
10057+ break;
10058+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
10059+ params[0] = (GLfloat)(0);
10060+ break;
10061+ case GL_MAX_TEXTURE_UNITS_ARB:
10062+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
10063+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
10064+ break;
10065+ case GL_ACTIVE_TEXTURE_ARB:
10066+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
10067+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
10068+ break;
10069+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
10070+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
10071+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
10072+ break;
10073+ case GL_TEXTURE_CUBE_MAP_ARB:
10074+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10075+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
10076+ break;
10077+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
10078+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10079+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
10080+ break;
10081+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
10082+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10083+ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
10084+ break;
10085+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
10086+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10087+ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
10088+ break;
10089+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
10090+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10091+ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
10092+ break;
10093+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
10094+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10095+ {
10096+ GLint formats[100];
10097+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
10098+ ASSERT(n <= 100);
10099+ for (i = 0; i < n; i++)
10100+ params[i] = ENUM_TO_INT(formats[i]);
10101+ }
10102+ break;
10103+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
10104+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
10105+ params[0] = (GLfloat)(ctx->Array.LockFirst);
10106+ break;
10107+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
10108+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
10109+ params[0] = (GLfloat)(ctx->Array.LockCount);
10110+ break;
10111+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
10112+ {
10113+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10114+ params[0] = matrix[0];
10115+ params[1] = matrix[4];
10116+ params[2] = matrix[8];
10117+ params[3] = matrix[12];
10118+ params[4] = matrix[1];
10119+ params[5] = matrix[5];
10120+ params[6] = matrix[9];
10121+ params[7] = matrix[13];
10122+ params[8] = matrix[2];
10123+ params[9] = matrix[6];
10124+ params[10] = matrix[10];
10125+ params[11] = matrix[14];
10126+ params[12] = matrix[3];
10127+ params[13] = matrix[7];
10128+ params[14] = matrix[11];
10129+ params[15] = matrix[15];
10130+ }
10131+ break;
10132+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
10133+ {
10134+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
10135+ params[0] = matrix[0];
10136+ params[1] = matrix[4];
10137+ params[2] = matrix[8];
10138+ params[3] = matrix[12];
10139+ params[4] = matrix[1];
10140+ params[5] = matrix[5];
10141+ params[6] = matrix[9];
10142+ params[7] = matrix[13];
10143+ params[8] = matrix[2];
10144+ params[9] = matrix[6];
10145+ params[10] = matrix[10];
10146+ params[11] = matrix[14];
10147+ params[12] = matrix[3];
10148+ params[13] = matrix[7];
10149+ params[14] = matrix[11];
10150+ params[15] = matrix[15];
10151+ }
10152+ break;
10153+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
10154+ {
10155+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
10156+ params[0] = matrix[0];
10157+ params[1] = matrix[4];
10158+ params[2] = matrix[8];
10159+ params[3] = matrix[12];
10160+ params[4] = matrix[1];
10161+ params[5] = matrix[5];
10162+ params[6] = matrix[9];
10163+ params[7] = matrix[13];
10164+ params[8] = matrix[2];
10165+ params[9] = matrix[6];
10166+ params[10] = matrix[10];
10167+ params[11] = matrix[14];
10168+ params[12] = matrix[3];
10169+ params[13] = matrix[7];
10170+ params[14] = matrix[11];
10171+ params[15] = matrix[15];
10172+ }
10173+ break;
10174+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
10175+ {
10176+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
10177+ params[0] = matrix[0];
10178+ params[1] = matrix[4];
10179+ params[2] = matrix[8];
10180+ params[3] = matrix[12];
10181+ params[4] = matrix[1];
10182+ params[5] = matrix[5];
10183+ params[6] = matrix[9];
10184+ params[7] = matrix[13];
10185+ params[8] = matrix[2];
10186+ params[9] = matrix[6];
10187+ params[10] = matrix[10];
10188+ params[11] = matrix[14];
10189+ params[12] = matrix[3];
10190+ params[13] = matrix[7];
10191+ params[14] = matrix[11];
10192+ params[15] = matrix[15];
10193+ }
10194+ break;
10195+ case GL_COLOR_MATRIX_SGI:
10196+ {
10197+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10198+ params[0] = matrix[0];
10199+ params[1] = matrix[1];
10200+ params[2] = matrix[2];
10201+ params[3] = matrix[3];
10202+ params[4] = matrix[4];
10203+ params[5] = matrix[5];
10204+ params[6] = matrix[6];
10205+ params[7] = matrix[7];
10206+ params[8] = matrix[8];
10207+ params[9] = matrix[9];
10208+ params[10] = matrix[10];
10209+ params[11] = matrix[11];
10210+ params[12] = matrix[12];
10211+ params[13] = matrix[13];
10212+ params[14] = matrix[14];
10213+ params[15] = matrix[15];
10214+ }
10215+ break;
10216+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
10217+ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
10218+ break;
10219+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
10220+ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
10221+ break;
10222+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
10223+ params[0] = ctx->Pixel.PostColorMatrixScale[0];
10224+ break;
10225+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
10226+ params[0] = ctx->Pixel.PostColorMatrixScale[1];
10227+ break;
10228+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
10229+ params[0] = ctx->Pixel.PostColorMatrixScale[2];
10230+ break;
10231+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
10232+ params[0] = ctx->Pixel.PostColorMatrixScale[3];
10233+ break;
10234+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
10235+ params[0] = ctx->Pixel.PostColorMatrixBias[0];
10236+ break;
10237+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
10238+ params[0] = ctx->Pixel.PostColorMatrixBias[1];
10239+ break;
10240+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
10241+ params[0] = ctx->Pixel.PostColorMatrixBias[2];
10242+ break;
10243+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
10244+ params[0] = ctx->Pixel.PostColorMatrixBias[3];
10245+ break;
10246+ case GL_CONVOLUTION_1D_EXT:
10247+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10248+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
10249+ break;
10250+ case GL_CONVOLUTION_2D_EXT:
10251+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10252+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
10253+ break;
10254+ case GL_SEPARABLE_2D_EXT:
10255+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10256+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
10257+ break;
10258+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
10259+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10260+ params[0] = ctx->Pixel.PostConvolutionScale[0];
10261+ break;
10262+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
10263+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10264+ params[0] = ctx->Pixel.PostConvolutionScale[1];
10265+ break;
10266+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
10267+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10268+ params[0] = ctx->Pixel.PostConvolutionScale[2];
10269+ break;
10270+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
10271+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10272+ params[0] = ctx->Pixel.PostConvolutionScale[3];
10273+ break;
10274+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
10275+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10276+ params[0] = ctx->Pixel.PostConvolutionBias[0];
10277+ break;
10278+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
10279+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10280+ params[0] = ctx->Pixel.PostConvolutionBias[1];
10281+ break;
10282+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
10283+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10284+ params[0] = ctx->Pixel.PostConvolutionBias[2];
10285+ break;
10286+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
10287+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10288+ params[0] = ctx->Pixel.PostConvolutionBias[3];
10289+ break;
10290+ case GL_HISTOGRAM:
10291+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10292+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
10293+ break;
10294+ case GL_MINMAX:
10295+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10296+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
10297+ break;
10298+ case GL_COLOR_TABLE_SGI:
10299+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10300+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
10301+ break;
10302+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
10303+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10304+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
10305+ break;
10306+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
10307+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10308+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
10309+ break;
10310+ case GL_TEXTURE_COLOR_TABLE_SGI:
10311+ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
10312+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
10313+ break;
10314+ case GL_COLOR_SUM_EXT:
10315+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
10316+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
10317+ break;
10318+ case GL_CURRENT_SECONDARY_COLOR_EXT:
10319+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10320+ {
10321+ FLUSH_CURRENT(ctx, 0);
10322+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
10323+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
10324+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
10325+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
10326+ }
10327+ break;
10328+ case GL_SECONDARY_COLOR_ARRAY_EXT:
10329+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10330+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
10331+ break;
10332+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
10333+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10334+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
10335+ break;
10336+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
10337+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10338+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
10339+ break;
10340+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
10341+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10342+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
10343+ break;
10344+ case GL_CURRENT_FOG_COORDINATE_EXT:
10345+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10346+ {
10347+ FLUSH_CURRENT(ctx, 0);
10348+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
10349+ }
10350+ break;
10351+ case GL_FOG_COORDINATE_ARRAY_EXT:
10352+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10353+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
10354+ break;
10355+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
10356+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10357+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
10358+ break;
10359+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
10360+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10361+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
10362+ break;
10363+ case GL_FOG_COORDINATE_SOURCE_EXT:
10364+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10365+ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
10366+ break;
10367+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
10368+ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
10369+ params[0] = ctx->Const.MaxTextureLodBias;
10370+ break;
10371+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
10372+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
10373+ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
10374+ break;
10375+ case GL_MULTISAMPLE_ARB:
10376+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10377+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
10378+ break;
10379+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
10380+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10381+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
10382+ break;
10383+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
10384+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10385+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
10386+ break;
10387+ case GL_SAMPLE_COVERAGE_ARB:
10388+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10389+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
10390+ break;
10391+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
10392+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10393+ params[0] = ctx->Multisample.SampleCoverageValue;
10394+ break;
10395+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
10396+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10397+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
10398+ break;
10399+ case GL_SAMPLE_BUFFERS_ARB:
10400+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10401+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
10402+ break;
10403+ case GL_SAMPLES_ARB:
10404+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10405+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
10406+ break;
10407+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
10408+ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
10409+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
10410+ break;
10411+ case GL_POINT_SPRITE_NV:
10412+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10413+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
10414+ break;
10415+ case GL_POINT_SPRITE_R_MODE_NV:
10416+ CHECK_EXT1(NV_point_sprite, "GetFloatv");
10417+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
10418+ break;
10419+ case GL_POINT_SPRITE_COORD_ORIGIN:
10420+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10421+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
10422+ break;
10423+ case GL_GENERATE_MIPMAP_HINT_SGIS:
10424+ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
10425+ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
10426+ break;
10427+ case GL_VERTEX_PROGRAM_BINDING_NV:
10428+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10429+ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
10430+ break;
10431+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
10432+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10433+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
10434+ break;
10435+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
10436+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10437+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
10438+ break;
10439+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
10440+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10441+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
10442+ break;
10443+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
10444+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10445+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
10446+ break;
10447+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
10448+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10449+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
10450+ break;
10451+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
10452+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10453+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
10454+ break;
10455+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
10456+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10457+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
10458+ break;
10459+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
10460+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10461+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
10462+ break;
10463+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
10464+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10465+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
10466+ break;
10467+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
10468+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10469+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
10470+ break;
10471+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
10472+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10473+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
10474+ break;
10475+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
10476+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10477+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
10478+ break;
10479+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
10480+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10481+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
10482+ break;
10483+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
10484+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10485+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
10486+ break;
10487+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
10488+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10489+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
10490+ break;
10491+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
10492+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10493+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
10494+ break;
10495+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
10496+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10497+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
10498+ break;
10499+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
10500+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10501+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
10502+ break;
10503+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
10504+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10505+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
10506+ break;
10507+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
10508+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10509+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
10510+ break;
10511+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
10512+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10513+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
10514+ break;
10515+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
10516+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10517+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
10518+ break;
10519+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
10520+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10521+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
10522+ break;
10523+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
10524+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10525+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
10526+ break;
10527+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
10528+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10529+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
10530+ break;
10531+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
10532+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10533+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
10534+ break;
10535+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
10536+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10537+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
10538+ break;
10539+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
10540+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10541+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
10542+ break;
10543+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
10544+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10545+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
10546+ break;
10547+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
10548+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10549+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
10550+ break;
10551+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
10552+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10553+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
10554+ break;
10555+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
10556+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10557+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
10558+ break;
10559+ case GL_FRAGMENT_PROGRAM_NV:
10560+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10561+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10562+ break;
10563+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
10564+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10565+ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
10566+ break;
10567+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
10568+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10569+ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
10570+ break;
10571+ case GL_TEXTURE_RECTANGLE_NV:
10572+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10573+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
10574+ break;
10575+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
10576+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10577+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
10578+ break;
10579+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
10580+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10581+ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
10582+ break;
10583+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
10584+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10585+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
10586+ break;
10587+ case GL_ACTIVE_STENCIL_FACE_EXT:
10588+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10589+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
10590+ break;
10591+ case GL_MAX_SHININESS_NV:
10592+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10593+ params[0] = ctx->Const.MaxShininess;
10594+ break;
10595+ case GL_MAX_SPOT_EXPONENT_NV:
10596+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10597+ params[0] = ctx->Const.MaxSpotExponent;
10598+ break;
10599+ case GL_ARRAY_BUFFER_BINDING_ARB:
10600+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10601+ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
10602+ break;
10603+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
10604+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10605+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
10606+ break;
10607+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
10608+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10609+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
10610+ break;
10611+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
10612+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10613+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
10614+ break;
10615+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
10616+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10617+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
10618+ break;
10619+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
10620+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10621+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
10622+ break;
10623+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
10624+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10625+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
10626+ break;
10627+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
10628+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10629+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
10630+ break;
10631+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
10632+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10633+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
10634+ break;
10635+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
10636+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10637+ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
10638+ break;
10639+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
10640+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10641+ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
10642+ break;
10643+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
10644+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10645+ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
10646+ break;
10647+ case GL_VERTEX_PROGRAM_ARB:
10648+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10649+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
10650+ break;
10651+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
10652+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10653+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
10654+ break;
10655+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
10656+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10657+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
10658+ break;
10659+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
10660+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10661+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
10662+ break;
10663+ case GL_MAX_PROGRAM_MATRICES_ARB:
10664+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10665+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
10666+ break;
10667+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
10668+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10669+ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
10670+ break;
10671+ case GL_CURRENT_MATRIX_ARB:
10672+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
10673+ {
10674+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10675+ params[0] = matrix[0];
10676+ params[1] = matrix[1];
10677+ params[2] = matrix[2];
10678+ params[3] = matrix[3];
10679+ params[4] = matrix[4];
10680+ params[5] = matrix[5];
10681+ params[6] = matrix[6];
10682+ params[7] = matrix[7];
10683+ params[8] = matrix[8];
10684+ params[9] = matrix[9];
10685+ params[10] = matrix[10];
10686+ params[11] = matrix[11];
10687+ params[12] = matrix[12];
10688+ params[13] = matrix[13];
10689+ params[14] = matrix[14];
10690+ params[15] = matrix[15];
10691+ }
10692+ break;
10693+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
10694+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
10695+ {
10696+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10697+ params[0] = matrix[0];
10698+ params[1] = matrix[4];
10699+ params[2] = matrix[8];
10700+ params[3] = matrix[12];
10701+ params[4] = matrix[1];
10702+ params[5] = matrix[5];
10703+ params[6] = matrix[9];
10704+ params[7] = matrix[13];
10705+ params[8] = matrix[2];
10706+ params[9] = matrix[6];
10707+ params[10] = matrix[10];
10708+ params[11] = matrix[14];
10709+ params[12] = matrix[3];
10710+ params[13] = matrix[7];
10711+ params[14] = matrix[11];
10712+ params[15] = matrix[15];
10713+ }
10714+ break;
10715+ case GL_MAX_VERTEX_ATTRIBS_ARB:
10716+ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
10717+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
10718+ break;
10719+ case GL_PROGRAM_ERROR_POSITION_ARB:
10720+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
10721+ params[0] = (GLfloat)(ctx->Program.ErrorPos);
10722+ break;
10723+ case GL_FRAGMENT_PROGRAM_ARB:
10724+ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
10725+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10726+ break;
10727+ case GL_MAX_TEXTURE_COORDS_ARB:
10728+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10729+ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
10730+ break;
10731+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
10732+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10733+ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
10734+ break;
10735+ case GL_DEPTH_BOUNDS_TEST_EXT:
10736+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10737+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
10738+ break;
10739+ case GL_DEPTH_BOUNDS_EXT:
10740+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10741+ params[0] = ctx->Depth.BoundsMin;
10742+ params[1] = ctx->Depth.BoundsMax;
10743+ break;
10744+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
10745+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10746+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
10747+ break;
10748+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
10749+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10750+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
10751+ break;
10752+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
10753+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10754+ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
10755+ break;
10756+ case GL_VERTEX_PROGRAM_POSITION_MESA:
10757+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10758+ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
10759+ break;
10760+ case GL_MAX_DRAW_BUFFERS_ARB:
10761+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10762+ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
10763+ break;
10764+ case GL_DRAW_BUFFER0_ARB:
10765+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10766+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10767+ break;
10768+ case GL_DRAW_BUFFER1_ARB:
10769+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10770+ {
10771+ GLenum buffer;
10772+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10773+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10774+ return;
10775+ }
10776+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
10777+ params[0] = ENUM_TO_FLOAT(buffer);
10778+ }
10779+ break;
10780+ case GL_DRAW_BUFFER2_ARB:
10781+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10782+ {
10783+ GLenum buffer;
10784+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10785+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10786+ return;
10787+ }
10788+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
10789+ params[0] = ENUM_TO_FLOAT(buffer);
10790+ }
10791+ break;
10792+ case GL_DRAW_BUFFER3_ARB:
10793+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10794+ {
10795+ GLenum buffer;
10796+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10797+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10798+ return;
10799+ }
10800+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
10801+ params[0] = ENUM_TO_FLOAT(buffer);
10802+ }
10803+ break;
10804+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
10805+ CHECK_EXT1(OES_read_format, "GetFloatv");
10806+ params[0] = (GLfloat)(ctx->Const.ColorReadType);
10807+ break;
10808+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
10809+ CHECK_EXT1(OES_read_format, "GetFloatv");
10810+ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
10811+ break;
10812+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
10813+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10814+ params[0] = (GLfloat)(6);
10815+ break;
10816+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
10817+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10818+ params[0] = (GLfloat)(8);
10819+ break;
10820+ case GL_NUM_PASSES_ATI:
10821+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10822+ params[0] = (GLfloat)(2);
10823+ break;
10824+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
10825+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10826+ params[0] = (GLfloat)(8);
10827+ break;
10828+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
10829+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10830+ params[0] = (GLfloat)(16);
10831+ break;
10832+ case GL_COLOR_ALPHA_PAIRING_ATI:
10833+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10834+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
10835+ break;
10836+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
10837+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10838+ params[0] = (GLfloat)(3);
10839+ break;
10840+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
10841+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10842+ params[0] = (GLfloat)(3);
10843+ break;
10844+ case GL_STENCIL_BACK_FUNC:
10845+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
10846+ break;
10847+ case GL_STENCIL_BACK_VALUE_MASK:
10848+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
10849+ break;
10850+ case GL_STENCIL_BACK_REF:
10851+ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
10852+ break;
10853+ case GL_STENCIL_BACK_FAIL:
10854+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
10855+ break;
10856+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
10857+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
10858+ break;
10859+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
10860+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
10861+ break;
10862+ case GL_FRAMEBUFFER_BINDING_EXT:
10863+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10864+ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
10865+ break;
10866+ case GL_RENDERBUFFER_BINDING_EXT:
10867+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10868+ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
10869+ break;
10870+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
10871+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10872+ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
10873+ break;
10874+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
10875+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10876+ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
10877+ break;
10878+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
10879+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10880+ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
10881+ break;
10882+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
10883+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10884+ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
10885+ break;
10886+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
10887+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10888+ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
10889+ break;
10890+ case GL_MAX_VARYING_FLOATS_ARB:
10891+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10892+ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
10893+ break;
10894+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
10895+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10896+ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
10897+ break;
10898+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
10899+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10900+ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
10901+ break;
10902+ default:
10903+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
10904+ }
10905+}
10906+
10907+void GLAPIENTRY
10908+_mesa_GetIntegerv( GLenum pname, GLint *params )
10909+{
10910+ GET_CURRENT_CONTEXT(ctx);
10911+ ASSERT_OUTSIDE_BEGIN_END(ctx);
10912+
10913+ if (!params)
10914+ return;
10915+
10916+ if (ctx->NewState)
10917+ _mesa_update_state(ctx);
10918+
10919+ if (ctx->Driver.GetIntegerv &&
10920+ ctx->Driver.GetIntegerv(ctx, pname, params))
10921+ return;
10922+
10923+ switch (pname) {
10924+ case GL_ACCUM_RED_BITS:
10925+ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
10926+ break;
10927+ case GL_ACCUM_GREEN_BITS:
10928+ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
10929+ break;
10930+ case GL_ACCUM_BLUE_BITS:
10931+ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
10932+ break;
10933+ case GL_ACCUM_ALPHA_BITS:
10934+ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
10935+ break;
10936+ case GL_ACCUM_CLEAR_VALUE:
10937+ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
10938+ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
10939+ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
10940+ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
10941+ break;
10942+ case GL_ALPHA_BIAS:
10943+ params[0] = IROUND(ctx->Pixel.AlphaBias);
10944+ break;
10945+ case GL_ALPHA_BITS:
10946+ params[0] = ctx->DrawBuffer->Visual.alphaBits;
10947+ break;
10948+ case GL_ALPHA_SCALE:
10949+ params[0] = IROUND(ctx->Pixel.AlphaScale);
10950+ break;
10951+ case GL_ALPHA_TEST:
10952+ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
10953+ break;
10954+ case GL_ALPHA_TEST_FUNC:
10955+ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
10956+ break;
10957+ case GL_ALPHA_TEST_REF:
10958+ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
10959+ break;
10960+ case GL_ATTRIB_STACK_DEPTH:
10961+ params[0] = ctx->AttribStackDepth;
10962+ break;
10963+ case GL_AUTO_NORMAL:
10964+ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
10965+ break;
10966+ case GL_AUX_BUFFERS:
10967+ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
10968+ break;
10969+ case GL_BLEND:
10970+ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
10971+ break;
10972+ case GL_BLEND_DST:
10973+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10974+ break;
10975+ case GL_BLEND_SRC:
10976+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10977+ break;
10978+ case GL_BLEND_SRC_RGB_EXT:
10979+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10980+ break;
10981+ case GL_BLEND_DST_RGB_EXT:
10982+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10983+ break;
10984+ case GL_BLEND_SRC_ALPHA_EXT:
10985+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
10986+ break;
10987+ case GL_BLEND_DST_ALPHA_EXT:
10988+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
10989+ break;
10990+ case GL_BLEND_EQUATION:
10991+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
10992+ break;
10993+ case GL_BLEND_EQUATION_ALPHA_EXT:
10994+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
10995+ break;
10996+ case GL_BLEND_COLOR_EXT:
10997+ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
10998+ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
10999+ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
11000+ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
11001+ break;
11002+ case GL_BLUE_BIAS:
11003+ params[0] = IROUND(ctx->Pixel.BlueBias);
11004+ break;
11005+ case GL_BLUE_BITS:
11006+ params[0] = ctx->DrawBuffer->Visual.blueBits;
11007+ break;
11008+ case GL_BLUE_SCALE:
11009+ params[0] = IROUND(ctx->Pixel.BlueScale);
11010+ break;
11011+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
11012+ params[0] = ctx->ClientAttribStackDepth;
11013+ break;
11014+ case GL_CLIP_PLANE0:
11015+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
11016+ break;
11017+ case GL_CLIP_PLANE1:
11018+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
11019+ break;
11020+ case GL_CLIP_PLANE2:
11021+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
11022+ break;
11023+ case GL_CLIP_PLANE3:
11024+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
11025+ break;
11026+ case GL_CLIP_PLANE4:
11027+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
11028+ break;
11029+ case GL_CLIP_PLANE5:
11030+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
11031+ break;
11032+ case GL_COLOR_CLEAR_VALUE:
11033+ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
11034+ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
11035+ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
11036+ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
11037+ break;
11038+ case GL_COLOR_MATERIAL:
11039+ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
11040+ break;
11041+ case GL_COLOR_MATERIAL_FACE:
11042+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
11043+ break;
11044+ case GL_COLOR_MATERIAL_PARAMETER:
11045+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
11046+ break;
11047+ case GL_COLOR_WRITEMASK:
11048+ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
11049+ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
11050+ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
11051+ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
11052+ break;
11053+ case GL_CULL_FACE:
11054+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
11055+ break;
11056+ case GL_CULL_FACE_MODE:
11057+ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
11058+ break;
11059+ case GL_CURRENT_COLOR:
11060+ {
11061+ FLUSH_CURRENT(ctx, 0);
11062+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
11063+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
11064+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
11065+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
11066+ }
11067+ break;
11068+ case GL_CURRENT_INDEX:
11069+ {
11070+ FLUSH_CURRENT(ctx, 0);
11071+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
11072+ }
11073+ break;
11074+ case GL_CURRENT_NORMAL:
11075+ {
11076+ FLUSH_CURRENT(ctx, 0);
11077+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
11078+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
11079+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
11080+ }
11081+ break;
11082+ case GL_CURRENT_RASTER_COLOR:
11083+ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
11084+ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
11085+ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
11086+ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
11087+ break;
11088+ case GL_CURRENT_RASTER_DISTANCE:
11089+ params[0] = IROUND(ctx->Current.RasterDistance);
11090+ break;
11091+ case GL_CURRENT_RASTER_INDEX:
11092+ params[0] = IROUND(ctx->Current.RasterIndex);
11093+ break;
11094+ case GL_CURRENT_RASTER_POSITION:
11095+ params[0] = IROUND(ctx->Current.RasterPos[0]);
11096+ params[1] = IROUND(ctx->Current.RasterPos[1]);
11097+ params[2] = IROUND(ctx->Current.RasterPos[2]);
11098+ params[3] = IROUND(ctx->Current.RasterPos[3]);
11099+ break;
11100+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
11101+ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
11102+ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
11103+ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
11104+ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
11105+ break;
11106+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
11107+ {
11108+ const GLuint texUnit = ctx->Texture.CurrentUnit;
11109+ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
11110+ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
11111+ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
11112+ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
11113+ }
11114+ break;
11115+ case GL_CURRENT_RASTER_POSITION_VALID:
11116+ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
11117+ break;
11118+ case GL_CURRENT_TEXTURE_COORDS:
11119+ {
11120+ const GLuint texUnit = ctx->Texture.CurrentUnit;
11121+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
11122+ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
11123+ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
11124+ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
11125+ }
11126+ break;
11127+ case GL_DEPTH_BIAS:
11128+ params[0] = IROUND(ctx->Pixel.DepthBias);
11129+ break;
11130+ case GL_DEPTH_BITS:
11131+ params[0] = ctx->DrawBuffer->Visual.depthBits;
11132+ break;
11133+ case GL_DEPTH_CLEAR_VALUE:
11134+ params[0] = IROUND(ctx->Depth.Clear);
11135+ break;
11136+ case GL_DEPTH_FUNC:
11137+ params[0] = ENUM_TO_INT(ctx->Depth.Func);
11138+ break;
11139+ case GL_DEPTH_RANGE:
11140+ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
11141+ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
11142+ break;
11143+ case GL_DEPTH_SCALE:
11144+ params[0] = IROUND(ctx->Pixel.DepthScale);
11145+ break;
11146+ case GL_DEPTH_TEST:
11147+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
11148+ break;
11149+ case GL_DEPTH_WRITEMASK:
11150+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
11151+ break;
11152+ case GL_DITHER:
11153+ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
11154+ break;
11155+ case GL_DOUBLEBUFFER:
11156+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
11157+ break;
11158+ case GL_DRAW_BUFFER:
11159+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
11160+ break;
11161+ case GL_EDGE_FLAG:
11162+ {
11163+ FLUSH_CURRENT(ctx, 0);
11164+ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
11165+ }
11166+ break;
11167+ case GL_FEEDBACK_BUFFER_SIZE:
11168+ params[0] = ctx->Feedback.BufferSize;
11169+ break;
11170+ case GL_FEEDBACK_BUFFER_TYPE:
11171+ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
11172+ break;
11173+ case GL_FOG:
11174+ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
11175+ break;
11176+ case GL_FOG_COLOR:
11177+ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
11178+ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
11179+ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
11180+ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
11181+ break;
11182+ case GL_FOG_DENSITY:
11183+ params[0] = IROUND(ctx->Fog.Density);
11184+ break;
11185+ case GL_FOG_END:
11186+ params[0] = IROUND(ctx->Fog.End);
11187+ break;
11188+ case GL_FOG_HINT:
11189+ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
11190+ break;
11191+ case GL_FOG_INDEX:
11192+ params[0] = IROUND(ctx->Fog.Index);
11193+ break;
11194+ case GL_FOG_MODE:
11195+ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
11196+ break;
11197+ case GL_FOG_START:
11198+ params[0] = IROUND(ctx->Fog.Start);
11199+ break;
11200+ case GL_FRONT_FACE:
11201+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
11202+ break;
11203+ case GL_GREEN_BIAS:
11204+ params[0] = IROUND(ctx->Pixel.GreenBias);
11205+ break;
11206+ case GL_GREEN_BITS:
11207+ params[0] = ctx->DrawBuffer->Visual.greenBits;
11208+ break;
11209+ case GL_GREEN_SCALE:
11210+ params[0] = IROUND(ctx->Pixel.GreenScale);
11211+ break;
11212+ case GL_INDEX_BITS:
11213+ params[0] = ctx->DrawBuffer->Visual.indexBits;
11214+ break;
11215+ case GL_INDEX_CLEAR_VALUE:
11216+ params[0] = ctx->Color.ClearIndex;
11217+ break;
11218+ case GL_INDEX_MODE:
11219+ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
11220+ break;
11221+ case GL_INDEX_OFFSET:
11222+ params[0] = ctx->Pixel.IndexOffset;
11223+ break;
11224+ case GL_INDEX_SHIFT:
11225+ params[0] = ctx->Pixel.IndexShift;
11226+ break;
11227+ case GL_INDEX_WRITEMASK:
11228+ params[0] = ctx->Color.IndexMask;
11229+ break;
11230+ case GL_LIGHT0:
11231+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
11232+ break;
11233+ case GL_LIGHT1:
11234+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
11235+ break;
11236+ case GL_LIGHT2:
11237+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
11238+ break;
11239+ case GL_LIGHT3:
11240+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
11241+ break;
11242+ case GL_LIGHT4:
11243+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
11244+ break;
11245+ case GL_LIGHT5:
11246+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
11247+ break;
11248+ case GL_LIGHT6:
11249+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
11250+ break;
11251+ case GL_LIGHT7:
11252+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
11253+ break;
11254+ case GL_LIGHTING:
11255+ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
11256+ break;
11257+ case GL_LIGHT_MODEL_AMBIENT:
11258+ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
11259+ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
11260+ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
11261+ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
11262+ break;
11263+ case GL_LIGHT_MODEL_COLOR_CONTROL:
11264+ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
11265+ break;
11266+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
11267+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
11268+ break;
11269+ case GL_LIGHT_MODEL_TWO_SIDE:
11270+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
11271+ break;
11272+ case GL_LINE_SMOOTH:
11273+ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
11274+ break;
11275+ case GL_LINE_SMOOTH_HINT:
11276+ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
11277+ break;
11278+ case GL_LINE_STIPPLE:
11279+ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
11280+ break;
11281+ case GL_LINE_STIPPLE_PATTERN:
11282+ params[0] = ctx->Line.StipplePattern;
11283+ break;
11284+ case GL_LINE_STIPPLE_REPEAT:
11285+ params[0] = ctx->Line.StippleFactor;
11286+ break;
11287+ case GL_LINE_WIDTH:
11288+ params[0] = IROUND(ctx->Line.Width);
11289+ break;
11290+ case GL_LINE_WIDTH_GRANULARITY:
11291+ params[0] = IROUND(ctx->Const.LineWidthGranularity);
11292+ break;
11293+ case GL_LINE_WIDTH_RANGE:
11294+ params[0] = IROUND(ctx->Const.MinLineWidthAA);
11295+ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
11296+ break;
11297+ case GL_ALIASED_LINE_WIDTH_RANGE:
11298+ params[0] = IROUND(ctx->Const.MinLineWidth);
11299+ params[1] = IROUND(ctx->Const.MaxLineWidth);
11300+ break;
11301+ case GL_LIST_BASE:
11302+ params[0] = ctx->List.ListBase;
11303+ break;
11304+ case GL_LIST_INDEX:
11305+ params[0] = ctx->ListState.CurrentListNum;
11306+ break;
11307+ case GL_LIST_MODE:
11308+ {
11309+ GLenum mode;
11310+ if (!ctx->CompileFlag)
11311+ mode = 0;
11312+ else if (ctx->ExecuteFlag)
11313+ mode = GL_COMPILE_AND_EXECUTE;
11314+ else
11315+ mode = GL_COMPILE;
11316+ params[0] = ENUM_TO_INT(mode);
11317+ }
11318+ break;
11319+ case GL_INDEX_LOGIC_OP:
11320+ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
11321+ break;
11322+ case GL_COLOR_LOGIC_OP:
11323+ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
11324+ break;
11325+ case GL_LOGIC_OP_MODE:
11326+ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
11327+ break;
11328+ case GL_MAP1_COLOR_4:
11329+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
11330+ break;
11331+ case GL_MAP1_GRID_DOMAIN:
11332+ params[0] = IROUND(ctx->Eval.MapGrid1u1);
11333+ params[1] = IROUND(ctx->Eval.MapGrid1u2);
11334+ break;
11335+ case GL_MAP1_GRID_SEGMENTS:
11336+ params[0] = ctx->Eval.MapGrid1un;
11337+ break;
11338+ case GL_MAP1_INDEX:
11339+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
11340+ break;
11341+ case GL_MAP1_NORMAL:
11342+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
11343+ break;
11344+ case GL_MAP1_TEXTURE_COORD_1:
11345+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
11346+ break;
11347+ case GL_MAP1_TEXTURE_COORD_2:
11348+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
11349+ break;
11350+ case GL_MAP1_TEXTURE_COORD_3:
11351+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
11352+ break;
11353+ case GL_MAP1_TEXTURE_COORD_4:
11354+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
11355+ break;
11356+ case GL_MAP1_VERTEX_3:
11357+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
11358+ break;
11359+ case GL_MAP1_VERTEX_4:
11360+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
11361+ break;
11362+ case GL_MAP2_COLOR_4:
11363+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
11364+ break;
11365+ case GL_MAP2_GRID_DOMAIN:
11366+ params[0] = IROUND(ctx->Eval.MapGrid2u1);
11367+ params[1] = IROUND(ctx->Eval.MapGrid2u2);
11368+ params[2] = IROUND(ctx->Eval.MapGrid2v1);
11369+ params[3] = IROUND(ctx->Eval.MapGrid2v2);
11370+ break;
11371+ case GL_MAP2_GRID_SEGMENTS:
11372+ params[0] = ctx->Eval.MapGrid2un;
11373+ params[1] = ctx->Eval.MapGrid2vn;
11374+ break;
11375+ case GL_MAP2_INDEX:
11376+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
11377+ break;
11378+ case GL_MAP2_NORMAL:
11379+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
11380+ break;
11381+ case GL_MAP2_TEXTURE_COORD_1:
11382+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
11383+ break;
11384+ case GL_MAP2_TEXTURE_COORD_2:
11385+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
11386+ break;
11387+ case GL_MAP2_TEXTURE_COORD_3:
11388+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
11389+ break;
11390+ case GL_MAP2_TEXTURE_COORD_4:
11391+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
11392+ break;
11393+ case GL_MAP2_VERTEX_3:
11394+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
11395+ break;
11396+ case GL_MAP2_VERTEX_4:
11397+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
11398+ break;
11399+ case GL_MAP_COLOR:
11400+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
11401+ break;
11402+ case GL_MAP_STENCIL:
11403+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
11404+ break;
11405+ case GL_MATRIX_MODE:
11406+ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
11407+ break;
11408+ case GL_MAX_ATTRIB_STACK_DEPTH:
11409+ params[0] = MAX_ATTRIB_STACK_DEPTH;
11410+ break;
11411+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
11412+ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
11413+ break;
11414+ case GL_MAX_CLIP_PLANES:
11415+ params[0] = ctx->Const.MaxClipPlanes;
11416+ break;
11417+ case GL_MAX_ELEMENTS_VERTICES:
11418+ params[0] = ctx->Const.MaxArrayLockSize;
11419+ break;
11420+ case GL_MAX_ELEMENTS_INDICES:
11421+ params[0] = ctx->Const.MaxArrayLockSize;
11422+ break;
11423+ case GL_MAX_EVAL_ORDER:
11424+ params[0] = MAX_EVAL_ORDER;
11425+ break;
11426+ case GL_MAX_LIGHTS:
11427+ params[0] = ctx->Const.MaxLights;
11428+ break;
11429+ case GL_MAX_LIST_NESTING:
11430+ params[0] = MAX_LIST_NESTING;
11431+ break;
11432+ case GL_MAX_MODELVIEW_STACK_DEPTH:
11433+ params[0] = MAX_MODELVIEW_STACK_DEPTH;
11434+ break;
11435+ case GL_MAX_NAME_STACK_DEPTH:
11436+ params[0] = MAX_NAME_STACK_DEPTH;
11437+ break;
11438+ case GL_MAX_PIXEL_MAP_TABLE:
11439+ params[0] = MAX_PIXEL_MAP_TABLE;
11440+ break;
11441+ case GL_MAX_PROJECTION_STACK_DEPTH:
11442+ params[0] = MAX_PROJECTION_STACK_DEPTH;
11443+ break;
11444+ case GL_MAX_TEXTURE_SIZE:
11445+ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
11446+ break;
11447+ case GL_MAX_3D_TEXTURE_SIZE:
11448+ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
11449+ break;
11450+ case GL_MAX_TEXTURE_STACK_DEPTH:
11451+ params[0] = MAX_TEXTURE_STACK_DEPTH;
11452+ break;
11453+ case GL_MAX_VIEWPORT_DIMS:
11454+ params[0] = ctx->Const.MaxViewportWidth;
11455+ params[1] = ctx->Const.MaxViewportHeight;
11456+ break;
11457+ case GL_MODELVIEW_MATRIX:
11458+ {
11459+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11460+ params[0] = IROUND(matrix[0]);
11461+ params[1] = IROUND(matrix[1]);
11462+ params[2] = IROUND(matrix[2]);
11463+ params[3] = IROUND(matrix[3]);
11464+ params[4] = IROUND(matrix[4]);
11465+ params[5] = IROUND(matrix[5]);
11466+ params[6] = IROUND(matrix[6]);
11467+ params[7] = IROUND(matrix[7]);
11468+ params[8] = IROUND(matrix[8]);
11469+ params[9] = IROUND(matrix[9]);
11470+ params[10] = IROUND(matrix[10]);
11471+ params[11] = IROUND(matrix[11]);
11472+ params[12] = IROUND(matrix[12]);
11473+ params[13] = IROUND(matrix[13]);
11474+ params[14] = IROUND(matrix[14]);
11475+ params[15] = IROUND(matrix[15]);
11476+ }
11477+ break;
11478+ case GL_MODELVIEW_STACK_DEPTH:
11479+ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
11480+ break;
11481+ case GL_NAME_STACK_DEPTH:
11482+ params[0] = ctx->Select.NameStackDepth;
11483+ break;
11484+ case GL_NORMALIZE:
11485+ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
11486+ break;
11487+ case GL_PACK_ALIGNMENT:
11488+ params[0] = ctx->Pack.Alignment;
11489+ break;
11490+ case GL_PACK_LSB_FIRST:
11491+ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
11492+ break;
11493+ case GL_PACK_ROW_LENGTH:
11494+ params[0] = ctx->Pack.RowLength;
11495+ break;
11496+ case GL_PACK_SKIP_PIXELS:
11497+ params[0] = ctx->Pack.SkipPixels;
11498+ break;
11499+ case GL_PACK_SKIP_ROWS:
11500+ params[0] = ctx->Pack.SkipRows;
11501+ break;
11502+ case GL_PACK_SWAP_BYTES:
11503+ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
11504+ break;
11505+ case GL_PACK_SKIP_IMAGES_EXT:
11506+ params[0] = ctx->Pack.SkipImages;
11507+ break;
11508+ case GL_PACK_IMAGE_HEIGHT_EXT:
11509+ params[0] = ctx->Pack.ImageHeight;
11510+ break;
11511+ case GL_PACK_INVERT_MESA:
11512+ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
11513+ break;
11514+ case GL_PERSPECTIVE_CORRECTION_HINT:
11515+ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
11516+ break;
11517+ case GL_PIXEL_MAP_A_TO_A_SIZE:
11518+ params[0] = ctx->Pixel.MapAtoAsize;
11519+ break;
11520+ case GL_PIXEL_MAP_B_TO_B_SIZE:
11521+ params[0] = ctx->Pixel.MapBtoBsize;
11522+ break;
11523+ case GL_PIXEL_MAP_G_TO_G_SIZE:
11524+ params[0] = ctx->Pixel.MapGtoGsize;
11525+ break;
11526+ case GL_PIXEL_MAP_I_TO_A_SIZE:
11527+ params[0] = ctx->Pixel.MapItoAsize;
11528+ break;
11529+ case GL_PIXEL_MAP_I_TO_B_SIZE:
11530+ params[0] = ctx->Pixel.MapItoBsize;
11531+ break;
11532+ case GL_PIXEL_MAP_I_TO_G_SIZE:
11533+ params[0] = ctx->Pixel.MapItoGsize;
11534+ break;
11535+ case GL_PIXEL_MAP_I_TO_I_SIZE:
11536+ params[0] = ctx->Pixel.MapItoIsize;
11537+ break;
11538+ case GL_PIXEL_MAP_I_TO_R_SIZE:
11539+ params[0] = ctx->Pixel.MapItoRsize;
11540+ break;
11541+ case GL_PIXEL_MAP_R_TO_R_SIZE:
11542+ params[0] = ctx->Pixel.MapRtoRsize;
11543+ break;
11544+ case GL_PIXEL_MAP_S_TO_S_SIZE:
11545+ params[0] = ctx->Pixel.MapStoSsize;
11546+ break;
11547+ case GL_POINT_SIZE:
11548+ params[0] = IROUND(ctx->Point.Size);
11549+ break;
11550+ case GL_POINT_SIZE_GRANULARITY:
11551+ params[0] = IROUND(ctx->Const.PointSizeGranularity);
11552+ break;
11553+ case GL_POINT_SIZE_RANGE:
11554+ params[0] = IROUND(ctx->Const.MinPointSizeAA);
11555+ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
11556+ break;
11557+ case GL_ALIASED_POINT_SIZE_RANGE:
11558+ params[0] = IROUND(ctx->Const.MinPointSize);
11559+ params[1] = IROUND(ctx->Const.MaxPointSize);
11560+ break;
11561+ case GL_POINT_SMOOTH:
11562+ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
11563+ break;
11564+ case GL_POINT_SMOOTH_HINT:
11565+ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
11566+ break;
11567+ case GL_POINT_SIZE_MIN_EXT:
11568+ params[0] = IROUND(ctx->Point.MinSize);
11569+ break;
11570+ case GL_POINT_SIZE_MAX_EXT:
11571+ params[0] = IROUND(ctx->Point.MaxSize);
11572+ break;
11573+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
11574+ params[0] = IROUND(ctx->Point.Threshold);
11575+ break;
11576+ case GL_DISTANCE_ATTENUATION_EXT:
11577+ params[0] = IROUND(ctx->Point.Params[0]);
11578+ params[1] = IROUND(ctx->Point.Params[1]);
11579+ params[2] = IROUND(ctx->Point.Params[2]);
11580+ break;
11581+ case GL_POLYGON_MODE:
11582+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
11583+ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
11584+ break;
11585+ case GL_POLYGON_OFFSET_BIAS_EXT:
11586+ params[0] = IROUND(ctx->Polygon.OffsetUnits);
11587+ break;
11588+ case GL_POLYGON_OFFSET_FACTOR:
11589+ params[0] = IROUND(ctx->Polygon.OffsetFactor );
11590+ break;
11591+ case GL_POLYGON_OFFSET_UNITS:
11592+ params[0] = IROUND(ctx->Polygon.OffsetUnits );
11593+ break;
11594+ case GL_POLYGON_SMOOTH:
11595+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
11596+ break;
11597+ case GL_POLYGON_SMOOTH_HINT:
11598+ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
11599+ break;
11600+ case GL_POLYGON_STIPPLE:
11601+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
11602+ break;
11603+ case GL_PROJECTION_MATRIX:
11604+ {
11605+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11606+ params[0] = IROUND(matrix[0]);
11607+ params[1] = IROUND(matrix[1]);
11608+ params[2] = IROUND(matrix[2]);
11609+ params[3] = IROUND(matrix[3]);
11610+ params[4] = IROUND(matrix[4]);
11611+ params[5] = IROUND(matrix[5]);
11612+ params[6] = IROUND(matrix[6]);
11613+ params[7] = IROUND(matrix[7]);
11614+ params[8] = IROUND(matrix[8]);
11615+ params[9] = IROUND(matrix[9]);
11616+ params[10] = IROUND(matrix[10]);
11617+ params[11] = IROUND(matrix[11]);
11618+ params[12] = IROUND(matrix[12]);
11619+ params[13] = IROUND(matrix[13]);
11620+ params[14] = IROUND(matrix[14]);
11621+ params[15] = IROUND(matrix[15]);
11622+ }
11623+ break;
11624+ case GL_PROJECTION_STACK_DEPTH:
11625+ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
11626+ break;
11627+ case GL_READ_BUFFER:
11628+ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
11629+ break;
11630+ case GL_RED_BIAS:
11631+ params[0] = IROUND(ctx->Pixel.RedBias);
11632+ break;
11633+ case GL_RED_BITS:
11634+ params[0] = ctx->DrawBuffer->Visual.redBits ;
11635+ break;
11636+ case GL_RED_SCALE:
11637+ params[0] = IROUND(ctx->Pixel.RedScale);
11638+ break;
11639+ case GL_RENDER_MODE:
11640+ params[0] = ENUM_TO_INT(ctx->RenderMode);
11641+ break;
11642+ case GL_RESCALE_NORMAL:
11643+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
11644+ break;
11645+ case GL_RGBA_MODE:
11646+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
11647+ break;
11648+ case GL_SCISSOR_BOX:
11649+ params[0] = ctx->Scissor.X;
11650+ params[1] = ctx->Scissor.Y;
11651+ params[2] = ctx->Scissor.Width;
11652+ params[3] = ctx->Scissor.Height;
11653+ break;
11654+ case GL_SCISSOR_TEST:
11655+ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
11656+ break;
11657+ case GL_SELECTION_BUFFER_SIZE:
11658+ params[0] = ctx->Select.BufferSize;
11659+ break;
11660+ case GL_SHADE_MODEL:
11661+ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
11662+ break;
11663+ case GL_SHARED_TEXTURE_PALETTE_EXT:
11664+ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
11665+ break;
11666+ case GL_STENCIL_BITS:
11667+ params[0] = ctx->DrawBuffer->Visual.stencilBits;
11668+ break;
11669+ case GL_STENCIL_CLEAR_VALUE:
11670+ params[0] = ctx->Stencil.Clear;
11671+ break;
11672+ case GL_STENCIL_FAIL:
11673+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
11674+ break;
11675+ case GL_STENCIL_FUNC:
11676+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
11677+ break;
11678+ case GL_STENCIL_PASS_DEPTH_FAIL:
11679+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
11680+ break;
11681+ case GL_STENCIL_PASS_DEPTH_PASS:
11682+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
11683+ break;
11684+ case GL_STENCIL_REF:
11685+ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
11686+ break;
11687+ case GL_STENCIL_TEST:
11688+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
11689+ break;
11690+ case GL_STENCIL_VALUE_MASK:
11691+ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
11692+ break;
11693+ case GL_STENCIL_WRITEMASK:
11694+ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
11695+ break;
11696+ case GL_STEREO:
11697+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
11698+ break;
11699+ case GL_SUBPIXEL_BITS:
11700+ params[0] = ctx->Const.SubPixelBits;
11701+ break;
11702+ case GL_TEXTURE_1D:
11703+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
11704+ break;
11705+ case GL_TEXTURE_2D:
11706+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
11707+ break;
11708+ case GL_TEXTURE_3D:
11709+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
11710+ break;
11711+ case GL_TEXTURE_BINDING_1D:
11712+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
11713+ break;
11714+ case GL_TEXTURE_BINDING_2D:
11715+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
11716+ break;
11717+ case GL_TEXTURE_BINDING_3D:
11718+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
11719+ break;
11720+ case GL_TEXTURE_ENV_COLOR:
11721+ {
11722+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
11723+ params[0] = FLOAT_TO_INT(color[0]);
11724+ params[1] = FLOAT_TO_INT(color[1]);
11725+ params[2] = FLOAT_TO_INT(color[2]);
11726+ params[3] = FLOAT_TO_INT(color[3]);
11727+ }
11728+ break;
11729+ case GL_TEXTURE_ENV_MODE:
11730+ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
11731+ break;
11732+ case GL_TEXTURE_GEN_S:
11733+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
11734+ break;
11735+ case GL_TEXTURE_GEN_T:
11736+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
11737+ break;
11738+ case GL_TEXTURE_GEN_R:
11739+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
11740+ break;
11741+ case GL_TEXTURE_GEN_Q:
11742+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
11743+ break;
11744+ case GL_TEXTURE_MATRIX:
11745+ {
11746+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11747+ params[0] = IROUND(matrix[0]);
11748+ params[1] = IROUND(matrix[1]);
11749+ params[2] = IROUND(matrix[2]);
11750+ params[3] = IROUND(matrix[3]);
11751+ params[4] = IROUND(matrix[4]);
11752+ params[5] = IROUND(matrix[5]);
11753+ params[6] = IROUND(matrix[6]);
11754+ params[7] = IROUND(matrix[7]);
11755+ params[8] = IROUND(matrix[8]);
11756+ params[9] = IROUND(matrix[9]);
11757+ params[10] = IROUND(matrix[10]);
11758+ params[11] = IROUND(matrix[11]);
11759+ params[12] = IROUND(matrix[12]);
11760+ params[13] = IROUND(matrix[13]);
11761+ params[14] = IROUND(matrix[14]);
11762+ params[15] = IROUND(matrix[15]);
11763+ }
11764+ break;
11765+ case GL_TEXTURE_STACK_DEPTH:
11766+ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
11767+ break;
11768+ case GL_UNPACK_ALIGNMENT:
11769+ params[0] = ctx->Unpack.Alignment;
11770+ break;
11771+ case GL_UNPACK_LSB_FIRST:
11772+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
11773+ break;
11774+ case GL_UNPACK_ROW_LENGTH:
11775+ params[0] = ctx->Unpack.RowLength;
11776+ break;
11777+ case GL_UNPACK_SKIP_PIXELS:
11778+ params[0] = ctx->Unpack.SkipPixels;
11779+ break;
11780+ case GL_UNPACK_SKIP_ROWS:
11781+ params[0] = ctx->Unpack.SkipRows;
11782+ break;
11783+ case GL_UNPACK_SWAP_BYTES:
11784+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
11785+ break;
11786+ case GL_UNPACK_SKIP_IMAGES_EXT:
11787+ params[0] = ctx->Unpack.SkipImages;
11788+ break;
11789+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
11790+ params[0] = ctx->Unpack.ImageHeight;
11791+ break;
11792+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
11793+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
11794+ break;
11795+ case GL_VIEWPORT:
11796+ params[0] = ctx->Viewport.X;
11797+ params[1] = ctx->Viewport.Y;
11798+ params[2] = ctx->Viewport.Width;
11799+ params[3] = ctx->Viewport.Height;
11800+ break;
11801+ case GL_ZOOM_X:
11802+ params[0] = IROUND(ctx->Pixel.ZoomX);
11803+ break;
11804+ case GL_ZOOM_Y:
11805+ params[0] = IROUND(ctx->Pixel.ZoomY);
11806+ break;
11807+ case GL_VERTEX_ARRAY:
11808+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
11809+ break;
11810+ case GL_VERTEX_ARRAY_SIZE:
11811+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
11812+ break;
11813+ case GL_VERTEX_ARRAY_TYPE:
11814+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
11815+ break;
11816+ case GL_VERTEX_ARRAY_STRIDE:
11817+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
11818+ break;
11819+ case GL_VERTEX_ARRAY_COUNT_EXT:
11820+ params[0] = 0;
11821+ break;
11822+ case GL_NORMAL_ARRAY:
11823+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
11824+ break;
11825+ case GL_NORMAL_ARRAY_TYPE:
11826+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
11827+ break;
11828+ case GL_NORMAL_ARRAY_STRIDE:
11829+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
11830+ break;
11831+ case GL_NORMAL_ARRAY_COUNT_EXT:
11832+ params[0] = 0;
11833+ break;
11834+ case GL_COLOR_ARRAY:
11835+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
11836+ break;
11837+ case GL_COLOR_ARRAY_SIZE:
11838+ params[0] = ctx->Array.ArrayObj->Color.Size;
11839+ break;
11840+ case GL_COLOR_ARRAY_TYPE:
11841+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
11842+ break;
11843+ case GL_COLOR_ARRAY_STRIDE:
11844+ params[0] = ctx->Array.ArrayObj->Color.Stride;
11845+ break;
11846+ case GL_COLOR_ARRAY_COUNT_EXT:
11847+ params[0] = 0;
11848+ break;
11849+ case GL_INDEX_ARRAY:
11850+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
11851+ break;
11852+ case GL_INDEX_ARRAY_TYPE:
11853+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
11854+ break;
11855+ case GL_INDEX_ARRAY_STRIDE:
11856+ params[0] = ctx->Array.ArrayObj->Index.Stride;
11857+ break;
11858+ case GL_INDEX_ARRAY_COUNT_EXT:
11859+ params[0] = 0;
11860+ break;
11861+ case GL_TEXTURE_COORD_ARRAY:
11862+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
11863+ break;
11864+ case GL_TEXTURE_COORD_ARRAY_SIZE:
11865+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
11866+ break;
11867+ case GL_TEXTURE_COORD_ARRAY_TYPE:
11868+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
11869+ break;
11870+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
11871+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
11872+ break;
11873+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
11874+ params[0] = 0;
11875+ break;
11876+ case GL_EDGE_FLAG_ARRAY:
11877+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
11878+ break;
11879+ case GL_EDGE_FLAG_ARRAY_STRIDE:
11880+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
11881+ break;
11882+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
11883+ params[0] = 0;
11884+ break;
11885+ case GL_MAX_TEXTURE_UNITS_ARB:
11886+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11887+ params[0] = ctx->Const.MaxTextureUnits;
11888+ break;
11889+ case GL_ACTIVE_TEXTURE_ARB:
11890+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11891+ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
11892+ break;
11893+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
11894+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11895+ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
11896+ break;
11897+ case GL_TEXTURE_CUBE_MAP_ARB:
11898+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11899+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
11900+ break;
11901+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
11902+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11903+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
11904+ break;
11905+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
11906+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11907+ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
11908+ break;
11909+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
11910+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11911+ params[0] = ctx->Hint.TextureCompression;
11912+ break;
11913+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
11914+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11915+ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
11916+ break;
11917+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
11918+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11919+ {
11920+ GLint formats[100];
11921+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
11922+ ASSERT(n <= 100);
11923+ for (i = 0; i < n; i++)
11924+ params[i] = ENUM_TO_INT(formats[i]);
11925+ }
11926+ break;
11927+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
11928+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11929+ params[0] = ctx->Array.LockFirst;
11930+ break;
11931+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
11932+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11933+ params[0] = ctx->Array.LockCount;
11934+ break;
11935+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
11936+ {
11937+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11938+ params[0] = IROUND(matrix[0]);
11939+ params[1] = IROUND(matrix[4]);
11940+ params[2] = IROUND(matrix[8]);
11941+ params[3] = IROUND(matrix[12]);
11942+ params[4] = IROUND(matrix[1]);
11943+ params[5] = IROUND(matrix[5]);
11944+ params[6] = IROUND(matrix[9]);
11945+ params[7] = IROUND(matrix[13]);
11946+ params[8] = IROUND(matrix[2]);
11947+ params[9] = IROUND(matrix[6]);
11948+ params[10] = IROUND(matrix[10]);
11949+ params[11] = IROUND(matrix[14]);
11950+ params[12] = IROUND(matrix[3]);
11951+ params[13] = IROUND(matrix[7]);
11952+ params[14] = IROUND(matrix[11]);
11953+ params[15] = IROUND(matrix[15]);
11954+ }
11955+ break;
11956+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
11957+ {
11958+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11959+ params[0] = IROUND(matrix[0]);
11960+ params[1] = IROUND(matrix[4]);
11961+ params[2] = IROUND(matrix[8]);
11962+ params[3] = IROUND(matrix[12]);
11963+ params[4] = IROUND(matrix[1]);
11964+ params[5] = IROUND(matrix[5]);
11965+ params[6] = IROUND(matrix[9]);
11966+ params[7] = IROUND(matrix[13]);
11967+ params[8] = IROUND(matrix[2]);
11968+ params[9] = IROUND(matrix[6]);
11969+ params[10] = IROUND(matrix[10]);
11970+ params[11] = IROUND(matrix[14]);
11971+ params[12] = IROUND(matrix[3]);
11972+ params[13] = IROUND(matrix[7]);
11973+ params[14] = IROUND(matrix[11]);
11974+ params[15] = IROUND(matrix[15]);
11975+ }
11976+ break;
11977+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
11978+ {
11979+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11980+ params[0] = IROUND(matrix[0]);
11981+ params[1] = IROUND(matrix[4]);
11982+ params[2] = IROUND(matrix[8]);
11983+ params[3] = IROUND(matrix[12]);
11984+ params[4] = IROUND(matrix[1]);
11985+ params[5] = IROUND(matrix[5]);
11986+ params[6] = IROUND(matrix[9]);
11987+ params[7] = IROUND(matrix[13]);
11988+ params[8] = IROUND(matrix[2]);
11989+ params[9] = IROUND(matrix[6]);
11990+ params[10] = IROUND(matrix[10]);
11991+ params[11] = IROUND(matrix[14]);
11992+ params[12] = IROUND(matrix[3]);
11993+ params[13] = IROUND(matrix[7]);
11994+ params[14] = IROUND(matrix[11]);
11995+ params[15] = IROUND(matrix[15]);
11996+ }
11997+ break;
11998+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
11999+ {
12000+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
12001+ params[0] = IROUND(matrix[0]);
12002+ params[1] = IROUND(matrix[4]);
12003+ params[2] = IROUND(matrix[8]);
12004+ params[3] = IROUND(matrix[12]);
12005+ params[4] = IROUND(matrix[1]);
12006+ params[5] = IROUND(matrix[5]);
12007+ params[6] = IROUND(matrix[9]);
12008+ params[7] = IROUND(matrix[13]);
12009+ params[8] = IROUND(matrix[2]);
12010+ params[9] = IROUND(matrix[6]);
12011+ params[10] = IROUND(matrix[10]);
12012+ params[11] = IROUND(matrix[14]);
12013+ params[12] = IROUND(matrix[3]);
12014+ params[13] = IROUND(matrix[7]);
12015+ params[14] = IROUND(matrix[11]);
12016+ params[15] = IROUND(matrix[15]);
12017+ }
12018+ break;
12019+ case GL_COLOR_MATRIX_SGI:
12020+ {
12021+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
12022+ params[0] = IROUND(matrix[0]);
12023+ params[1] = IROUND(matrix[1]);
12024+ params[2] = IROUND(matrix[2]);
12025+ params[3] = IROUND(matrix[3]);
12026+ params[4] = IROUND(matrix[4]);
12027+ params[5] = IROUND(matrix[5]);
12028+ params[6] = IROUND(matrix[6]);
12029+ params[7] = IROUND(matrix[7]);
12030+ params[8] = IROUND(matrix[8]);
12031+ params[9] = IROUND(matrix[9]);
12032+ params[10] = IROUND(matrix[10]);
12033+ params[11] = IROUND(matrix[11]);
12034+ params[12] = IROUND(matrix[12]);
12035+ params[13] = IROUND(matrix[13]);
12036+ params[14] = IROUND(matrix[14]);
12037+ params[15] = IROUND(matrix[15]);
12038+ }
12039+ break;
12040+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
12041+ params[0] = ctx->ColorMatrixStack.Depth + 1;
12042+ break;
12043+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
12044+ params[0] = MAX_COLOR_STACK_DEPTH;
12045+ break;
12046+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
12047+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
12048+ break;
12049+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
12050+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
12051+ break;
12052+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
12053+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
12054+ break;
12055+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
12056+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
12057+ break;
12058+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
12059+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
12060+ break;
12061+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
12062+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
12063+ break;
12064+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
12065+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
12066+ break;
12067+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
12068+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
12069+ break;
12070+ case GL_CONVOLUTION_1D_EXT:
12071+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12072+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
12073+ break;
12074+ case GL_CONVOLUTION_2D_EXT:
12075+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12076+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
12077+ break;
12078+ case GL_SEPARABLE_2D_EXT:
12079+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12080+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
12081+ break;
12082+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
12083+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12084+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
12085+ break;
12086+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
12087+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12088+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
12089+ break;
12090+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
12091+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12092+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
12093+ break;
12094+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
12095+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12096+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
12097+ break;
12098+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
12099+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12100+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
12101+ break;
12102+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
12103+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12104+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
12105+ break;
12106+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
12107+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12108+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
12109+ break;
12110+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
12111+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12112+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
12113+ break;
12114+ case GL_HISTOGRAM:
12115+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
12116+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
12117+ break;
12118+ case GL_MINMAX:
12119+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
12120+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
12121+ break;
12122+ case GL_COLOR_TABLE_SGI:
12123+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12124+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
12125+ break;
12126+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
12127+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12128+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
12129+ break;
12130+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
12131+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12132+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
12133+ break;
12134+ case GL_TEXTURE_COLOR_TABLE_SGI:
12135+ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
12136+ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
12137+ break;
12138+ case GL_COLOR_SUM_EXT:
12139+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
12140+ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
12141+ break;
12142+ case GL_CURRENT_SECONDARY_COLOR_EXT:
12143+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12144+ {
12145+ FLUSH_CURRENT(ctx, 0);
12146+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
12147+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
12148+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
12149+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
12150+ }
12151+ break;
12152+ case GL_SECONDARY_COLOR_ARRAY_EXT:
12153+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12154+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
12155+ break;
12156+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
12157+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12158+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
12159+ break;
12160+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
12161+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12162+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
12163+ break;
12164+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
12165+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12166+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
12167+ break;
12168+ case GL_CURRENT_FOG_COORDINATE_EXT:
12169+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12170+ {
12171+ FLUSH_CURRENT(ctx, 0);
12172+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
12173+ }
12174+ break;
12175+ case GL_FOG_COORDINATE_ARRAY_EXT:
12176+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12177+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
12178+ break;
12179+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
12180+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12181+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
12182+ break;
12183+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
12184+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12185+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
12186+ break;
12187+ case GL_FOG_COORDINATE_SOURCE_EXT:
12188+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12189+ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
12190+ break;
12191+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
12192+ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
12193+ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
12194+ break;
12195+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
12196+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
12197+ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
12198+ break;
12199+ case GL_MULTISAMPLE_ARB:
12200+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12201+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
12202+ break;
12203+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
12204+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12205+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
12206+ break;
12207+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
12208+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12209+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
12210+ break;
12211+ case GL_SAMPLE_COVERAGE_ARB:
12212+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12213+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
12214+ break;
12215+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
12216+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12217+ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
12218+ break;
12219+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
12220+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12221+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
12222+ break;
12223+ case GL_SAMPLE_BUFFERS_ARB:
12224+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12225+ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
12226+ break;
12227+ case GL_SAMPLES_ARB:
12228+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12229+ params[0] = ctx->DrawBuffer->Visual.samples;
12230+ break;
12231+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
12232+ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
12233+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
12234+ break;
12235+ case GL_POINT_SPRITE_NV:
12236+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12237+ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
12238+ break;
12239+ case GL_POINT_SPRITE_R_MODE_NV:
12240+ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
12241+ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
12242+ break;
12243+ case GL_POINT_SPRITE_COORD_ORIGIN:
12244+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12245+ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
12246+ break;
12247+ case GL_GENERATE_MIPMAP_HINT_SGIS:
12248+ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
12249+ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
12250+ break;
12251+ case GL_VERTEX_PROGRAM_BINDING_NV:
12252+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12253+ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
12254+ break;
12255+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
12256+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12257+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
12258+ break;
12259+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
12260+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12261+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
12262+ break;
12263+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
12264+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12265+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
12266+ break;
12267+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
12268+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12269+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
12270+ break;
12271+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
12272+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12273+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
12274+ break;
12275+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
12276+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12277+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
12278+ break;
12279+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
12280+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12281+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
12282+ break;
12283+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
12284+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12285+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
12286+ break;
12287+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
12288+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12289+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
12290+ break;
12291+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
12292+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12293+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
12294+ break;
12295+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
12296+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12297+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
12298+ break;
12299+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
12300+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12301+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
12302+ break;
12303+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
12304+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12305+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
12306+ break;
12307+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
12308+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12309+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
12310+ break;
12311+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
12312+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12313+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
12314+ break;
12315+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
12316+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12317+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
12318+ break;
12319+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
12320+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12321+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
12322+ break;
12323+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
12324+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12325+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
12326+ break;
12327+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
12328+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12329+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
12330+ break;
12331+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
12332+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12333+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
12334+ break;
12335+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
12336+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12337+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
12338+ break;
12339+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
12340+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12341+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
12342+ break;
12343+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
12344+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12345+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
12346+ break;
12347+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
12348+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12349+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
12350+ break;
12351+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
12352+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12353+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
12354+ break;
12355+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
12356+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12357+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
12358+ break;
12359+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
12360+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12361+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
12362+ break;
12363+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
12364+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12365+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
12366+ break;
12367+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
12368+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12369+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
12370+ break;
12371+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
12372+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12373+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
12374+ break;
12375+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
12376+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12377+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
12378+ break;
12379+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
12380+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12381+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
12382+ break;
12383+ case GL_FRAGMENT_PROGRAM_NV:
12384+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12385+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12386+ break;
12387+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
12388+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12389+ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
12390+ break;
12391+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
12392+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12393+ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
12394+ break;
12395+ case GL_TEXTURE_RECTANGLE_NV:
12396+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12397+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
12398+ break;
12399+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
12400+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12401+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
12402+ break;
12403+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
12404+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12405+ params[0] = ctx->Const.MaxTextureRectSize;
12406+ break;
12407+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
12408+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12409+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
12410+ break;
12411+ case GL_ACTIVE_STENCIL_FACE_EXT:
12412+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12413+ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
12414+ break;
12415+ case GL_MAX_SHININESS_NV:
12416+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12417+ params[0] = IROUND(ctx->Const.MaxShininess);
12418+ break;
12419+ case GL_MAX_SPOT_EXPONENT_NV:
12420+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12421+ params[0] = IROUND(ctx->Const.MaxSpotExponent);
12422+ break;
12423+ case GL_ARRAY_BUFFER_BINDING_ARB:
12424+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12425+ params[0] = ctx->Array.ArrayBufferObj->Name;
12426+ break;
12427+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
12428+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12429+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
12430+ break;
12431+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
12432+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12433+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
12434+ break;
12435+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
12436+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12437+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
12438+ break;
12439+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
12440+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12441+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
12442+ break;
12443+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
12444+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12445+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
12446+ break;
12447+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
12448+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12449+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
12450+ break;
12451+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
12452+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12453+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
12454+ break;
12455+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
12456+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12457+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
12458+ break;
12459+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
12460+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12461+ params[0] = ctx->Array.ElementArrayBufferObj->Name;
12462+ break;
12463+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
12464+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12465+ params[0] = ctx->Pack.BufferObj->Name;
12466+ break;
12467+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
12468+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12469+ params[0] = ctx->Unpack.BufferObj->Name;
12470+ break;
12471+ case GL_VERTEX_PROGRAM_ARB:
12472+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12473+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
12474+ break;
12475+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
12476+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12477+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
12478+ break;
12479+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
12480+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12481+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
12482+ break;
12483+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
12484+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12485+ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
12486+ break;
12487+ case GL_MAX_PROGRAM_MATRICES_ARB:
12488+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12489+ params[0] = ctx->Const.MaxProgramMatrices;
12490+ break;
12491+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
12492+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12493+ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
12494+ break;
12495+ case GL_CURRENT_MATRIX_ARB:
12496+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12497+ {
12498+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12499+ params[0] = IROUND(matrix[0]);
12500+ params[1] = IROUND(matrix[1]);
12501+ params[2] = IROUND(matrix[2]);
12502+ params[3] = IROUND(matrix[3]);
12503+ params[4] = IROUND(matrix[4]);
12504+ params[5] = IROUND(matrix[5]);
12505+ params[6] = IROUND(matrix[6]);
12506+ params[7] = IROUND(matrix[7]);
12507+ params[8] = IROUND(matrix[8]);
12508+ params[9] = IROUND(matrix[9]);
12509+ params[10] = IROUND(matrix[10]);
12510+ params[11] = IROUND(matrix[11]);
12511+ params[12] = IROUND(matrix[12]);
12512+ params[13] = IROUND(matrix[13]);
12513+ params[14] = IROUND(matrix[14]);
12514+ params[15] = IROUND(matrix[15]);
12515+ }
12516+ break;
12517+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
12518+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
12519+ {
12520+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12521+ params[0] = IROUND(matrix[0]);
12522+ params[1] = IROUND(matrix[4]);
12523+ params[2] = IROUND(matrix[8]);
12524+ params[3] = IROUND(matrix[12]);
12525+ params[4] = IROUND(matrix[1]);
12526+ params[5] = IROUND(matrix[5]);
12527+ params[6] = IROUND(matrix[9]);
12528+ params[7] = IROUND(matrix[13]);
12529+ params[8] = IROUND(matrix[2]);
12530+ params[9] = IROUND(matrix[6]);
12531+ params[10] = IROUND(matrix[10]);
12532+ params[11] = IROUND(matrix[14]);
12533+ params[12] = IROUND(matrix[3]);
12534+ params[13] = IROUND(matrix[7]);
12535+ params[14] = IROUND(matrix[11]);
12536+ params[15] = IROUND(matrix[15]);
12537+ }
12538+ break;
12539+ case GL_MAX_VERTEX_ATTRIBS_ARB:
12540+ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
12541+ params[0] = ctx->Const.VertexProgram.MaxAttribs;
12542+ break;
12543+ case GL_PROGRAM_ERROR_POSITION_ARB:
12544+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
12545+ params[0] = ctx->Program.ErrorPos;
12546+ break;
12547+ case GL_FRAGMENT_PROGRAM_ARB:
12548+ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
12549+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12550+ break;
12551+ case GL_MAX_TEXTURE_COORDS_ARB:
12552+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12553+ params[0] = ctx->Const.MaxTextureCoordUnits;
12554+ break;
12555+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
12556+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12557+ params[0] = ctx->Const.MaxTextureImageUnits;
12558+ break;
12559+ case GL_DEPTH_BOUNDS_TEST_EXT:
12560+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12561+ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
12562+ break;
12563+ case GL_DEPTH_BOUNDS_EXT:
12564+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12565+ params[0] = IROUND(ctx->Depth.BoundsMin);
12566+ params[1] = IROUND(ctx->Depth.BoundsMax);
12567+ break;
12568+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
12569+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12570+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
12571+ break;
12572+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
12573+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12574+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
12575+ break;
12576+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
12577+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12578+ params[0] = ctx->FragmentProgram.CurrentPosition;
12579+ break;
12580+ case GL_VERTEX_PROGRAM_POSITION_MESA:
12581+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12582+ params[0] = ctx->VertexProgram.CurrentPosition;
12583+ break;
12584+ case GL_MAX_DRAW_BUFFERS_ARB:
12585+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12586+ params[0] = ctx->Const.MaxDrawBuffers;
12587+ break;
12588+ case GL_DRAW_BUFFER0_ARB:
12589+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12590+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
12591+ break;
12592+ case GL_DRAW_BUFFER1_ARB:
12593+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12594+ {
12595+ GLenum buffer;
12596+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12597+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12598+ return;
12599+ }
12600+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
12601+ params[0] = ENUM_TO_INT(buffer);
12602+ }
12603+ break;
12604+ case GL_DRAW_BUFFER2_ARB:
12605+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12606+ {
12607+ GLenum buffer;
12608+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12609+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12610+ return;
12611+ }
12612+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
12613+ params[0] = ENUM_TO_INT(buffer);
12614+ }
12615+ break;
12616+ case GL_DRAW_BUFFER3_ARB:
12617+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12618+ {
12619+ GLenum buffer;
12620+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12621+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12622+ return;
12623+ }
12624+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
12625+ params[0] = ENUM_TO_INT(buffer);
12626+ }
12627+ break;
12628+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
12629+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12630+ params[0] = ctx->Const.ColorReadType;
12631+ break;
12632+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
12633+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12634+ params[0] = ctx->Const.ColorReadFormat;
12635+ break;
12636+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
12637+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12638+ params[0] = 6;
12639+ break;
12640+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
12641+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12642+ params[0] = 8;
12643+ break;
12644+ case GL_NUM_PASSES_ATI:
12645+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12646+ params[0] = 2;
12647+ break;
12648+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
12649+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12650+ params[0] = 8;
12651+ break;
12652+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
12653+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12654+ params[0] = 16;
12655+ break;
12656+ case GL_COLOR_ALPHA_PAIRING_ATI:
12657+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12658+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
12659+ break;
12660+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
12661+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12662+ params[0] = 3;
12663+ break;
12664+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
12665+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12666+ params[0] = 3;
12667+ break;
12668+ case GL_STENCIL_BACK_FUNC:
12669+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
12670+ break;
12671+ case GL_STENCIL_BACK_VALUE_MASK:
12672+ params[0] = ctx->Stencil.ValueMask[1];
12673+ break;
12674+ case GL_STENCIL_BACK_REF:
12675+ params[0] = ctx->Stencil.Ref[1];
12676+ break;
12677+ case GL_STENCIL_BACK_FAIL:
12678+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
12679+ break;
12680+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
12681+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
12682+ break;
12683+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
12684+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
12685+ break;
12686+ case GL_FRAMEBUFFER_BINDING_EXT:
12687+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12688+ params[0] = ctx->DrawBuffer->Name;
12689+ break;
12690+ case GL_RENDERBUFFER_BINDING_EXT:
12691+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12692+ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
12693+ break;
12694+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
12695+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12696+ params[0] = ctx->Const.MaxColorAttachments;
12697+ break;
12698+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
12699+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12700+ params[0] = ctx->Const.MaxRenderbufferSize;
12701+ break;
12702+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
12703+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12704+ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
12705+ break;
12706+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
12707+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12708+ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
12709+ break;
12710+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
12711+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12712+ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
12713+ break;
12714+ case GL_MAX_VARYING_FLOATS_ARB:
12715+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12716+ params[0] = MAX_VARYING_FLOATS;
12717+ break;
12718+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
12719+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12720+ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
12721+ break;
12722+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
12723+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12724+ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
12725+ break;
12726+ default:
12727+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
12728+ }
12729+}
12730+
12731+
12732+void GLAPIENTRY
12733+_mesa_GetDoublev( GLenum pname, GLdouble *params )
12734+{
12735+ const GLfloat magic = -1234.5F;
12736+ GLfloat values[16];
12737+ GLuint i;
12738+
12739+ if (!params)
12740+ return;
12741+
12742+ /* Init temp array to magic numbers so we can figure out how many values
12743+ * are returned by the GetFloatv() call.
12744+ */
12745+ for (i = 0; i < 16; i++)
12746+ values[i] = magic;
12747+
12748+ _mesa_GetFloatv(pname, values);
12749+
12750+ for (i = 0; i < 16 && values[i] != magic; i++)
12751+ params[i] = (GLdouble) values[i];
12752+}
12753+
12754diff --git a/target-i386/mesa_gl.h b/target-i386/mesa_gl.h
12755new file mode 100644
12756index 0000000..dc2047c
12757--- /dev/null
12758+++ b/target-i386/mesa_gl.h
12759@@ -0,0 +1,2251 @@
12760+/*
12761+ * Mesa 3-D graphics library
12762+ * Version: 6.5.1
12763+ *
12764+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12765+ *
12766+ * Permission is hereby granted, free of charge, to any person obtaining a
12767+ * copy of this software and associated documentation files (the "Software"),
12768+ * to deal in the Software without restriction, including without limitation
12769+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12770+ * and/or sell copies of the Software, and to permit persons to whom the
12771+ * Software is furnished to do so, subject to the following conditions:
12772+ *
12773+ * The above copyright notice and this permission notice shall be included
12774+ * in all copies or substantial portions of the Software.
12775+ *
12776+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12777+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12778+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12779+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
12780+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
12781+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12782+ */
12783+
12784+
12785+#ifndef __gl_h_
12786+#define __gl_h_
12787+
12788+#if defined(USE_MGL_NAMESPACE)
12789+#include "gl_mangle.h"
12790+#endif
12791+
12792+
12793+/**********************************************************************
12794+ * Begin system-specific stuff. Do not do any of this when building
12795+ * for SciTech SNAP, as this is all done before this header file is
12796+ * included.
12797+ */
12798+#if !defined(__SCITECH_SNAP__)
12799+
12800+#if defined(__BEOS__)
12801+#include <stdlib.h> /* to get some BeOS-isms */
12802+#endif
12803+
12804+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
12805+#define OPENSTEP
12806+#endif
12807+
12808+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
12809+#define __WIN32__
12810+#endif
12811+
12812+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
12813+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
12814+# define GLAPI __declspec(dllexport)
12815+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
12816+# define GLAPI __declspec(dllimport)
12817+# else /* for use with static link lib build of Win32 edition only */
12818+# define GLAPI extern
12819+# endif /* _STATIC_MESA support */
12820+# define GLAPIENTRY __stdcall
12821+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
12822+# define GLAPI extern
12823+# define GLAPIENTRY __stdcall
12824+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
12825+# define GLAPI __attribute__((visibility("default")))
12826+# define GLAPIENTRY
12827+#endif /* WIN32 && !CYGWIN */
12828+
12829+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
12830+# define PRAGMA_EXPORT_SUPPORTED 1
12831+#endif
12832+
12833+/*
12834+ * WINDOWS: Include windows.h here to define APIENTRY.
12835+ * It is also useful when applications include this file by
12836+ * including only glut.h, since glut.h depends on windows.h.
12837+ * Applications needing to include windows.h with parms other
12838+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
12839+ * glut.h or gl.h.
12840+ */
12841+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
12842+#define WIN32_LEAN_AND_MEAN 1
12843+#include <windows.h>
12844+#endif
12845+
12846+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
12847+#include <GL/mesa_wgl.h>
12848+#endif
12849+
12850+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
12851+#pragma import on
12852+#endif
12853+
12854+#ifndef GLAPI
12855+#define GLAPI extern
12856+#endif
12857+
12858+#ifndef GLAPIENTRY
12859+#define GLAPIENTRY
12860+#endif
12861+
12862+#ifndef APIENTRY
12863+#define APIENTRY GLAPIENTRY
12864+#endif
12865+
12866+/* "P" suffix to be used for a pointer to a function */
12867+#ifndef APIENTRYP
12868+#define APIENTRYP APIENTRY *
12869+#endif
12870+
12871+#ifndef GLAPIENTRYP
12872+#define GLAPIENTRYP GLAPIENTRY *
12873+#endif
12874+
12875+#ifdef CENTERLINE_CLPP
12876+#define signed
12877+#endif
12878+
12879+#if defined(PRAGMA_EXPORT_SUPPORTED)
12880+#pragma export on
12881+#endif
12882+
12883+#endif /* !__SCITECH_SNAP__ */
12884+/*
12885+ * End system-specific stuff.
12886+ **********************************************************************/
12887+
12888+
12889+
12890+#ifdef __cplusplus
12891+extern "C" {
12892+#endif
12893+
12894+
12895+
12896+#define GL_VERSION_1_1 1
12897+#define GL_VERSION_1_2 1
12898+#define GL_VERSION_1_3 1
12899+#define GL_ARB_imaging 1
12900+
12901+
12902+/*
12903+ * Datatypes
12904+ */
12905+typedef unsigned int GLenum;
12906+typedef unsigned char GLboolean;
12907+typedef unsigned int GLbitfield;
12908+typedef void GLvoid;
12909+typedef signed char GLbyte; /* 1-byte signed */
12910+typedef short GLshort; /* 2-byte signed */
12911+typedef int GLint; /* 4-byte signed */
12912+typedef unsigned char GLubyte; /* 1-byte unsigned */
12913+typedef unsigned short GLushort; /* 2-byte unsigned */
12914+typedef unsigned int GLuint; /* 4-byte unsigned */
12915+typedef int GLsizei; /* 4-byte signed */
12916+typedef float GLfloat; /* single precision float */
12917+typedef float GLclampf; /* single precision float in [0,1] */
12918+typedef double GLdouble; /* double precision float */
12919+typedef double GLclampd; /* double precision float in [0,1] */
12920+
12921+
12922+
12923+/*
12924+ * Constants
12925+ */
12926+
12927+/* Boolean values */
12928+#define GL_FALSE 0x0
12929+#define GL_TRUE 0x1
12930+
12931+/* Data types */
12932+#define GL_BYTE 0x1400
12933+#define GL_UNSIGNED_BYTE 0x1401
12934+#define GL_SHORT 0x1402
12935+#define GL_UNSIGNED_SHORT 0x1403
12936+#define GL_INT 0x1404
12937+#define GL_UNSIGNED_INT 0x1405
12938+#define GL_FLOAT 0x1406
12939+#define GL_2_BYTES 0x1407
12940+#define GL_3_BYTES 0x1408
12941+#define GL_4_BYTES 0x1409
12942+#define GL_DOUBLE 0x140A
12943+
12944+/* Primitives */
12945+#define GL_POINTS 0x0000
12946+#define GL_LINES 0x0001
12947+#define GL_LINE_LOOP 0x0002
12948+#define GL_LINE_STRIP 0x0003
12949+#define GL_TRIANGLES 0x0004
12950+#define GL_TRIANGLE_STRIP 0x0005
12951+#define GL_TRIANGLE_FAN 0x0006
12952+#define GL_QUADS 0x0007
12953+#define GL_QUAD_STRIP 0x0008
12954+#define GL_POLYGON 0x0009
12955+
12956+/* Vertex Arrays */
12957+#define GL_VERTEX_ARRAY 0x8074
12958+#define GL_NORMAL_ARRAY 0x8075
12959+#define GL_COLOR_ARRAY 0x8076
12960+#define GL_INDEX_ARRAY 0x8077
12961+#define GL_TEXTURE_COORD_ARRAY 0x8078
12962+#define GL_EDGE_FLAG_ARRAY 0x8079
12963+#define GL_VERTEX_ARRAY_SIZE 0x807A
12964+#define GL_VERTEX_ARRAY_TYPE 0x807B
12965+#define GL_VERTEX_ARRAY_STRIDE 0x807C
12966+#define GL_NORMAL_ARRAY_TYPE 0x807E
12967+#define GL_NORMAL_ARRAY_STRIDE 0x807F
12968+#define GL_COLOR_ARRAY_SIZE 0x8081
12969+#define GL_COLOR_ARRAY_TYPE 0x8082
12970+#define GL_COLOR_ARRAY_STRIDE 0x8083
12971+#define GL_INDEX_ARRAY_TYPE 0x8085
12972+#define GL_INDEX_ARRAY_STRIDE 0x8086
12973+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
12974+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
12975+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
12976+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
12977+#define GL_VERTEX_ARRAY_POINTER 0x808E
12978+#define GL_NORMAL_ARRAY_POINTER 0x808F
12979+#define GL_COLOR_ARRAY_POINTER 0x8090
12980+#define GL_INDEX_ARRAY_POINTER 0x8091
12981+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
12982+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
12983+#define GL_V2F 0x2A20
12984+#define GL_V3F 0x2A21
12985+#define GL_C4UB_V2F 0x2A22
12986+#define GL_C4UB_V3F 0x2A23
12987+#define GL_C3F_V3F 0x2A24
12988+#define GL_N3F_V3F 0x2A25
12989+#define GL_C4F_N3F_V3F 0x2A26
12990+#define GL_T2F_V3F 0x2A27
12991+#define GL_T4F_V4F 0x2A28
12992+#define GL_T2F_C4UB_V3F 0x2A29
12993+#define GL_T2F_C3F_V3F 0x2A2A
12994+#define GL_T2F_N3F_V3F 0x2A2B
12995+#define GL_T2F_C4F_N3F_V3F 0x2A2C
12996+#define GL_T4F_C4F_N3F_V4F 0x2A2D
12997+
12998+/* Matrix Mode */
12999+#define GL_MATRIX_MODE 0x0BA0
13000+#define GL_MODELVIEW 0x1700
13001+#define GL_PROJECTION 0x1701
13002+#define GL_TEXTURE 0x1702
13003+
13004+/* Points */
13005+#define GL_POINT_SMOOTH 0x0B10
13006+#define GL_POINT_SIZE 0x0B11
13007+#define GL_POINT_SIZE_GRANULARITY 0x0B13
13008+#define GL_POINT_SIZE_RANGE 0x0B12
13009+
13010+/* Lines */
13011+#define GL_LINE_SMOOTH 0x0B20
13012+#define GL_LINE_STIPPLE 0x0B24
13013+#define GL_LINE_STIPPLE_PATTERN 0x0B25
13014+#define GL_LINE_STIPPLE_REPEAT 0x0B26
13015+#define GL_LINE_WIDTH 0x0B21
13016+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
13017+#define GL_LINE_WIDTH_RANGE 0x0B22
13018+
13019+/* Polygons */
13020+#define GL_POINT 0x1B00
13021+#define GL_LINE 0x1B01
13022+#define GL_FILL 0x1B02
13023+#define GL_CW 0x0900
13024+#define GL_CCW 0x0901
13025+#define GL_FRONT 0x0404
13026+#define GL_BACK 0x0405
13027+#define GL_POLYGON_MODE 0x0B40
13028+#define GL_POLYGON_SMOOTH 0x0B41
13029+#define GL_POLYGON_STIPPLE 0x0B42
13030+#define GL_EDGE_FLAG 0x0B43
13031+#define GL_CULL_FACE 0x0B44
13032+#define GL_CULL_FACE_MODE 0x0B45
13033+#define GL_FRONT_FACE 0x0B46
13034+#define GL_POLYGON_OFFSET_FACTOR 0x8038
13035+#define GL_POLYGON_OFFSET_UNITS 0x2A00
13036+#define GL_POLYGON_OFFSET_POINT 0x2A01
13037+#define GL_POLYGON_OFFSET_LINE 0x2A02
13038+#define GL_POLYGON_OFFSET_FILL 0x8037
13039+
13040+/* Display Lists */
13041+#define GL_COMPILE 0x1300
13042+#define GL_COMPILE_AND_EXECUTE 0x1301
13043+#define GL_LIST_BASE 0x0B32
13044+#define GL_LIST_INDEX 0x0B33
13045+#define GL_LIST_MODE 0x0B30
13046+
13047+/* Depth buffer */
13048+#define GL_NEVER 0x0200
13049+#define GL_LESS 0x0201
13050+#define GL_EQUAL 0x0202
13051+#define GL_LEQUAL 0x0203
13052+#define GL_GREATER 0x0204
13053+#define GL_NOTEQUAL 0x0205
13054+#define GL_GEQUAL 0x0206
13055+#define GL_ALWAYS 0x0207
13056+#define GL_DEPTH_TEST 0x0B71
13057+#define GL_DEPTH_BITS 0x0D56
13058+#define GL_DEPTH_CLEAR_VALUE 0x0B73
13059+#define GL_DEPTH_FUNC 0x0B74
13060+#define GL_DEPTH_RANGE 0x0B70
13061+#define GL_DEPTH_WRITEMASK 0x0B72
13062+#define GL_DEPTH_COMPONENT 0x1902
13063+
13064+/* Lighting */
13065+#define GL_LIGHTING 0x0B50
13066+#define GL_LIGHT0 0x4000
13067+#define GL_LIGHT1 0x4001
13068+#define GL_LIGHT2 0x4002
13069+#define GL_LIGHT3 0x4003
13070+#define GL_LIGHT4 0x4004
13071+#define GL_LIGHT5 0x4005
13072+#define GL_LIGHT6 0x4006
13073+#define GL_LIGHT7 0x4007
13074+#define GL_SPOT_EXPONENT 0x1205
13075+#define GL_SPOT_CUTOFF 0x1206
13076+#define GL_CONSTANT_ATTENUATION 0x1207
13077+#define GL_LINEAR_ATTENUATION 0x1208
13078+#define GL_QUADRATIC_ATTENUATION 0x1209
13079+#define GL_AMBIENT 0x1200
13080+#define GL_DIFFUSE 0x1201
13081+#define GL_SPECULAR 0x1202
13082+#define GL_SHININESS 0x1601
13083+#define GL_EMISSION 0x1600
13084+#define GL_POSITION 0x1203
13085+#define GL_SPOT_DIRECTION 0x1204
13086+#define GL_AMBIENT_AND_DIFFUSE 0x1602
13087+#define GL_COLOR_INDEXES 0x1603
13088+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
13089+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
13090+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
13091+#define GL_FRONT_AND_BACK 0x0408
13092+#define GL_SHADE_MODEL 0x0B54
13093+#define GL_FLAT 0x1D00
13094+#define GL_SMOOTH 0x1D01
13095+#define GL_COLOR_MATERIAL 0x0B57
13096+#define GL_COLOR_MATERIAL_FACE 0x0B55
13097+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
13098+#define GL_NORMALIZE 0x0BA1
13099+
13100+/* User clipping planes */
13101+#define GL_CLIP_PLANE0 0x3000
13102+#define GL_CLIP_PLANE1 0x3001
13103+#define GL_CLIP_PLANE2 0x3002
13104+#define GL_CLIP_PLANE3 0x3003
13105+#define GL_CLIP_PLANE4 0x3004
13106+#define GL_CLIP_PLANE5 0x3005
13107+
13108+/* Accumulation buffer */
13109+#define GL_ACCUM_RED_BITS 0x0D58
13110+#define GL_ACCUM_GREEN_BITS 0x0D59
13111+#define GL_ACCUM_BLUE_BITS 0x0D5A
13112+#define GL_ACCUM_ALPHA_BITS 0x0D5B
13113+#define GL_ACCUM_CLEAR_VALUE 0x0B80
13114+#define GL_ACCUM 0x0100
13115+#define GL_ADD 0x0104
13116+#define GL_LOAD 0x0101
13117+#define GL_MULT 0x0103
13118+#define GL_RETURN 0x0102
13119+
13120+/* Alpha testing */
13121+#define GL_ALPHA_TEST 0x0BC0
13122+#define GL_ALPHA_TEST_REF 0x0BC2
13123+#define GL_ALPHA_TEST_FUNC 0x0BC1
13124+
13125+/* Blending */
13126+#define GL_BLEND 0x0BE2
13127+#define GL_BLEND_SRC 0x0BE1
13128+#define GL_BLEND_DST 0x0BE0
13129+#define GL_ZERO 0x0
13130+#define GL_ONE 0x1
13131+#define GL_SRC_COLOR 0x0300
13132+#define GL_ONE_MINUS_SRC_COLOR 0x0301
13133+#define GL_SRC_ALPHA 0x0302
13134+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
13135+#define GL_DST_ALPHA 0x0304
13136+#define GL_ONE_MINUS_DST_ALPHA 0x0305
13137+#define GL_DST_COLOR 0x0306
13138+#define GL_ONE_MINUS_DST_COLOR 0x0307
13139+#define GL_SRC_ALPHA_SATURATE 0x0308
13140+
13141+/* Render Mode */
13142+#define GL_FEEDBACK 0x1C01
13143+#define GL_RENDER 0x1C00
13144+#define GL_SELECT 0x1C02
13145+
13146+/* Feedback */
13147+#define GL_2D 0x0600
13148+#define GL_3D 0x0601
13149+#define GL_3D_COLOR 0x0602
13150+#define GL_3D_COLOR_TEXTURE 0x0603
13151+#define GL_4D_COLOR_TEXTURE 0x0604
13152+#define GL_POINT_TOKEN 0x0701
13153+#define GL_LINE_TOKEN 0x0702
13154+#define GL_LINE_RESET_TOKEN 0x0707
13155+#define GL_POLYGON_TOKEN 0x0703
13156+#define GL_BITMAP_TOKEN 0x0704
13157+#define GL_DRAW_PIXEL_TOKEN 0x0705
13158+#define GL_COPY_PIXEL_TOKEN 0x0706
13159+#define GL_PASS_THROUGH_TOKEN 0x0700
13160+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
13161+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
13162+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
13163+
13164+/* Selection */
13165+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
13166+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
13167+
13168+/* Fog */
13169+#define GL_FOG 0x0B60
13170+#define GL_FOG_MODE 0x0B65
13171+#define GL_FOG_DENSITY 0x0B62
13172+#define GL_FOG_COLOR 0x0B66
13173+#define GL_FOG_INDEX 0x0B61
13174+#define GL_FOG_START 0x0B63
13175+#define GL_FOG_END 0x0B64
13176+#define GL_LINEAR 0x2601
13177+#define GL_EXP 0x0800
13178+#define GL_EXP2 0x0801
13179+
13180+/* Logic Ops */
13181+#define GL_LOGIC_OP 0x0BF1
13182+#define GL_INDEX_LOGIC_OP 0x0BF1
13183+#define GL_COLOR_LOGIC_OP 0x0BF2
13184+#define GL_LOGIC_OP_MODE 0x0BF0
13185+#define GL_CLEAR 0x1500
13186+#define GL_SET 0x150F
13187+#define GL_COPY 0x1503
13188+#define GL_COPY_INVERTED 0x150C
13189+#define GL_NOOP 0x1505
13190+#define GL_INVERT 0x150A
13191+#define GL_AND 0x1501
13192+#define GL_NAND 0x150E
13193+#define GL_OR 0x1507
13194+#define GL_NOR 0x1508
13195+#define GL_XOR 0x1506
13196+#define GL_EQUIV 0x1509
13197+#define GL_AND_REVERSE 0x1502
13198+#define GL_AND_INVERTED 0x1504
13199+#define GL_OR_REVERSE 0x150B
13200+#define GL_OR_INVERTED 0x150D
13201+
13202+/* Stencil */
13203+#define GL_STENCIL_BITS 0x0D57
13204+#define GL_STENCIL_TEST 0x0B90
13205+#define GL_STENCIL_CLEAR_VALUE 0x0B91
13206+#define GL_STENCIL_FUNC 0x0B92
13207+#define GL_STENCIL_VALUE_MASK 0x0B93
13208+#define GL_STENCIL_FAIL 0x0B94
13209+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
13210+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
13211+#define GL_STENCIL_REF 0x0B97
13212+#define GL_STENCIL_WRITEMASK 0x0B98
13213+#define GL_STENCIL_INDEX 0x1901
13214+#define GL_KEEP 0x1E00
13215+#define GL_REPLACE 0x1E01
13216+#define GL_INCR 0x1E02
13217+#define GL_DECR 0x1E03
13218+
13219+/* Buffers, Pixel Drawing/Reading */
13220+#define GL_NONE 0x0
13221+#define GL_LEFT 0x0406
13222+#define GL_RIGHT 0x0407
13223+/*GL_FRONT 0x0404 */
13224+/*GL_BACK 0x0405 */
13225+/*GL_FRONT_AND_BACK 0x0408 */
13226+#define GL_FRONT_LEFT 0x0400
13227+#define GL_FRONT_RIGHT 0x0401
13228+#define GL_BACK_LEFT 0x0402
13229+#define GL_BACK_RIGHT 0x0403
13230+#define GL_AUX0 0x0409
13231+#define GL_AUX1 0x040A
13232+#define GL_AUX2 0x040B
13233+#define GL_AUX3 0x040C
13234+#define GL_COLOR_INDEX 0x1900
13235+#define GL_RED 0x1903
13236+#define GL_GREEN 0x1904
13237+#define GL_BLUE 0x1905
13238+#define GL_ALPHA 0x1906
13239+#define GL_LUMINANCE 0x1909
13240+#define GL_LUMINANCE_ALPHA 0x190A
13241+#define GL_ALPHA_BITS 0x0D55
13242+#define GL_RED_BITS 0x0D52
13243+#define GL_GREEN_BITS 0x0D53
13244+#define GL_BLUE_BITS 0x0D54
13245+#define GL_INDEX_BITS 0x0D51
13246+#define GL_SUBPIXEL_BITS 0x0D50
13247+#define GL_AUX_BUFFERS 0x0C00
13248+#define GL_READ_BUFFER 0x0C02
13249+#define GL_DRAW_BUFFER 0x0C01
13250+#define GL_DOUBLEBUFFER 0x0C32
13251+#define GL_STEREO 0x0C33
13252+#define GL_BITMAP 0x1A00
13253+#define GL_COLOR 0x1800
13254+#define GL_DEPTH 0x1801
13255+#define GL_STENCIL 0x1802
13256+#define GL_DITHER 0x0BD0
13257+#define GL_RGB 0x1907
13258+#define GL_RGBA 0x1908
13259+
13260+/* Implementation limits */
13261+#define GL_MAX_LIST_NESTING 0x0B31
13262+#define GL_MAX_EVAL_ORDER 0x0D30
13263+#define GL_MAX_LIGHTS 0x0D31
13264+#define GL_MAX_CLIP_PLANES 0x0D32
13265+#define GL_MAX_TEXTURE_SIZE 0x0D33
13266+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
13267+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
13268+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
13269+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
13270+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
13271+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
13272+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
13273+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
13274+
13275+/* Gets */
13276+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
13277+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
13278+#define GL_COLOR_CLEAR_VALUE 0x0C22
13279+#define GL_COLOR_WRITEMASK 0x0C23
13280+#define GL_CURRENT_INDEX 0x0B01
13281+#define GL_CURRENT_COLOR 0x0B00
13282+#define GL_CURRENT_NORMAL 0x0B02
13283+#define GL_CURRENT_RASTER_COLOR 0x0B04
13284+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
13285+#define GL_CURRENT_RASTER_INDEX 0x0B05
13286+#define GL_CURRENT_RASTER_POSITION 0x0B07
13287+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
13288+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
13289+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
13290+#define GL_INDEX_CLEAR_VALUE 0x0C20
13291+#define GL_INDEX_MODE 0x0C30
13292+#define GL_INDEX_WRITEMASK 0x0C21
13293+#define GL_MODELVIEW_MATRIX 0x0BA6
13294+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
13295+#define GL_NAME_STACK_DEPTH 0x0D70
13296+#define GL_PROJECTION_MATRIX 0x0BA7
13297+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
13298+#define GL_RENDER_MODE 0x0C40
13299+#define GL_RGBA_MODE 0x0C31
13300+#define GL_TEXTURE_MATRIX 0x0BA8
13301+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
13302+#define GL_VIEWPORT 0x0BA2
13303+
13304+/* Evaluators */
13305+#define GL_AUTO_NORMAL 0x0D80
13306+#define GL_MAP1_COLOR_4 0x0D90
13307+#define GL_MAP1_INDEX 0x0D91
13308+#define GL_MAP1_NORMAL 0x0D92
13309+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
13310+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
13311+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
13312+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
13313+#define GL_MAP1_VERTEX_3 0x0D97
13314+#define GL_MAP1_VERTEX_4 0x0D98
13315+#define GL_MAP2_COLOR_4 0x0DB0
13316+#define GL_MAP2_INDEX 0x0DB1
13317+#define GL_MAP2_NORMAL 0x0DB2
13318+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
13319+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
13320+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
13321+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
13322+#define GL_MAP2_VERTEX_3 0x0DB7
13323+#define GL_MAP2_VERTEX_4 0x0DB8
13324+#define GL_MAP1_GRID_DOMAIN 0x0DD0
13325+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
13326+#define GL_MAP2_GRID_DOMAIN 0x0DD2
13327+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
13328+#define GL_COEFF 0x0A00
13329+#define GL_ORDER 0x0A01
13330+#define GL_DOMAIN 0x0A02
13331+
13332+/* Hints */
13333+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
13334+#define GL_POINT_SMOOTH_HINT 0x0C51
13335+#define GL_LINE_SMOOTH_HINT 0x0C52
13336+#define GL_POLYGON_SMOOTH_HINT 0x0C53
13337+#define GL_FOG_HINT 0x0C54
13338+#define GL_DONT_CARE 0x1100
13339+#define GL_FASTEST 0x1101
13340+#define GL_NICEST 0x1102
13341+
13342+/* Scissor box */
13343+#define GL_SCISSOR_BOX 0x0C10
13344+#define GL_SCISSOR_TEST 0x0C11
13345+
13346+/* Pixel Mode / Transfer */
13347+#define GL_MAP_COLOR 0x0D10
13348+#define GL_MAP_STENCIL 0x0D11
13349+#define GL_INDEX_SHIFT 0x0D12
13350+#define GL_INDEX_OFFSET 0x0D13
13351+#define GL_RED_SCALE 0x0D14
13352+#define GL_RED_BIAS 0x0D15
13353+#define GL_GREEN_SCALE 0x0D18
13354+#define GL_GREEN_BIAS 0x0D19
13355+#define GL_BLUE_SCALE 0x0D1A
13356+#define GL_BLUE_BIAS 0x0D1B
13357+#define GL_ALPHA_SCALE 0x0D1C
13358+#define GL_ALPHA_BIAS 0x0D1D
13359+#define GL_DEPTH_SCALE 0x0D1E
13360+#define GL_DEPTH_BIAS 0x0D1F
13361+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
13362+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
13363+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
13364+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
13365+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
13366+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
13367+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
13368+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
13369+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
13370+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
13371+#define GL_PIXEL_MAP_S_TO_S 0x0C71
13372+#define GL_PIXEL_MAP_I_TO_I 0x0C70
13373+#define GL_PIXEL_MAP_I_TO_R 0x0C72
13374+#define GL_PIXEL_MAP_I_TO_G 0x0C73
13375+#define GL_PIXEL_MAP_I_TO_B 0x0C74
13376+#define GL_PIXEL_MAP_I_TO_A 0x0C75
13377+#define GL_PIXEL_MAP_R_TO_R 0x0C76
13378+#define GL_PIXEL_MAP_G_TO_G 0x0C77
13379+#define GL_PIXEL_MAP_B_TO_B 0x0C78
13380+#define GL_PIXEL_MAP_A_TO_A 0x0C79
13381+#define GL_PACK_ALIGNMENT 0x0D05
13382+#define GL_PACK_LSB_FIRST 0x0D01
13383+#define GL_PACK_ROW_LENGTH 0x0D02
13384+#define GL_PACK_SKIP_PIXELS 0x0D04
13385+#define GL_PACK_SKIP_ROWS 0x0D03
13386+#define GL_PACK_SWAP_BYTES 0x0D00
13387+#define GL_UNPACK_ALIGNMENT 0x0CF5
13388+#define GL_UNPACK_LSB_FIRST 0x0CF1
13389+#define GL_UNPACK_ROW_LENGTH 0x0CF2
13390+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
13391+#define GL_UNPACK_SKIP_ROWS 0x0CF3
13392+#define GL_UNPACK_SWAP_BYTES 0x0CF0
13393+#define GL_ZOOM_X 0x0D16
13394+#define GL_ZOOM_Y 0x0D17
13395+
13396+/* Texture mapping */
13397+#define GL_TEXTURE_ENV 0x2300
13398+#define GL_TEXTURE_ENV_MODE 0x2200
13399+#define GL_TEXTURE_1D 0x0DE0
13400+#define GL_TEXTURE_2D 0x0DE1
13401+#define GL_TEXTURE_WRAP_S 0x2802
13402+#define GL_TEXTURE_WRAP_T 0x2803
13403+#define GL_TEXTURE_MAG_FILTER 0x2800
13404+#define GL_TEXTURE_MIN_FILTER 0x2801
13405+#define GL_TEXTURE_ENV_COLOR 0x2201
13406+#define GL_TEXTURE_GEN_S 0x0C60
13407+#define GL_TEXTURE_GEN_T 0x0C61
13408+#define GL_TEXTURE_GEN_MODE 0x2500
13409+#define GL_TEXTURE_BORDER_COLOR 0x1004
13410+#define GL_TEXTURE_WIDTH 0x1000
13411+#define GL_TEXTURE_HEIGHT 0x1001
13412+#define GL_TEXTURE_BORDER 0x1005
13413+#define GL_TEXTURE_COMPONENTS 0x1003
13414+#define GL_TEXTURE_RED_SIZE 0x805C
13415+#define GL_TEXTURE_GREEN_SIZE 0x805D
13416+#define GL_TEXTURE_BLUE_SIZE 0x805E
13417+#define GL_TEXTURE_ALPHA_SIZE 0x805F
13418+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
13419+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
13420+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
13421+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
13422+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
13423+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
13424+#define GL_OBJECT_LINEAR 0x2401
13425+#define GL_OBJECT_PLANE 0x2501
13426+#define GL_EYE_LINEAR 0x2400
13427+#define GL_EYE_PLANE 0x2502
13428+#define GL_SPHERE_MAP 0x2402
13429+#define GL_DECAL 0x2101
13430+#define GL_MODULATE 0x2100
13431+#define GL_NEAREST 0x2600
13432+#define GL_REPEAT 0x2901
13433+#define GL_CLAMP 0x2900
13434+#define GL_S 0x2000
13435+#define GL_T 0x2001
13436+#define GL_R 0x2002
13437+#define GL_Q 0x2003
13438+#define GL_TEXTURE_GEN_R 0x0C62
13439+#define GL_TEXTURE_GEN_Q 0x0C63
13440+
13441+/* Utility */
13442+#define GL_VENDOR 0x1F00
13443+#define GL_RENDERER 0x1F01
13444+#define GL_VERSION 0x1F02
13445+#define GL_EXTENSIONS 0x1F03
13446+
13447+/* Errors */
13448+#define GL_NO_ERROR 0x0
13449+#define GL_INVALID_ENUM 0x0500
13450+#define GL_INVALID_VALUE 0x0501
13451+#define GL_INVALID_OPERATION 0x0502
13452+#define GL_STACK_OVERFLOW 0x0503
13453+#define GL_STACK_UNDERFLOW 0x0504
13454+#define GL_OUT_OF_MEMORY 0x0505
13455+
13456+/* glPush/PopAttrib bits */
13457+#define GL_CURRENT_BIT 0x00000001
13458+#define GL_POINT_BIT 0x00000002
13459+#define GL_LINE_BIT 0x00000004
13460+#define GL_POLYGON_BIT 0x00000008
13461+#define GL_POLYGON_STIPPLE_BIT 0x00000010
13462+#define GL_PIXEL_MODE_BIT 0x00000020
13463+#define GL_LIGHTING_BIT 0x00000040
13464+#define GL_FOG_BIT 0x00000080
13465+#define GL_DEPTH_BUFFER_BIT 0x00000100
13466+#define GL_ACCUM_BUFFER_BIT 0x00000200
13467+#define GL_STENCIL_BUFFER_BIT 0x00000400
13468+#define GL_VIEWPORT_BIT 0x00000800
13469+#define GL_TRANSFORM_BIT 0x00001000
13470+#define GL_ENABLE_BIT 0x00002000
13471+#define GL_COLOR_BUFFER_BIT 0x00004000
13472+#define GL_HINT_BIT 0x00008000
13473+#define GL_EVAL_BIT 0x00010000
13474+#define GL_LIST_BIT 0x00020000
13475+#define GL_TEXTURE_BIT 0x00040000
13476+#define GL_SCISSOR_BIT 0x00080000
13477+#define GL_ALL_ATTRIB_BITS 0x000FFFFF
13478+
13479+
13480+/* OpenGL 1.1 */
13481+#define GL_PROXY_TEXTURE_1D 0x8063
13482+#define GL_PROXY_TEXTURE_2D 0x8064
13483+#define GL_TEXTURE_PRIORITY 0x8066
13484+#define GL_TEXTURE_RESIDENT 0x8067
13485+#define GL_TEXTURE_BINDING_1D 0x8068
13486+#define GL_TEXTURE_BINDING_2D 0x8069
13487+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
13488+#define GL_ALPHA4 0x803B
13489+#define GL_ALPHA8 0x803C
13490+#define GL_ALPHA12 0x803D
13491+#define GL_ALPHA16 0x803E
13492+#define GL_LUMINANCE4 0x803F
13493+#define GL_LUMINANCE8 0x8040
13494+#define GL_LUMINANCE12 0x8041
13495+#define GL_LUMINANCE16 0x8042
13496+#define GL_LUMINANCE4_ALPHA4 0x8043
13497+#define GL_LUMINANCE6_ALPHA2 0x8044
13498+#define GL_LUMINANCE8_ALPHA8 0x8045
13499+#define GL_LUMINANCE12_ALPHA4 0x8046
13500+#define GL_LUMINANCE12_ALPHA12 0x8047
13501+#define GL_LUMINANCE16_ALPHA16 0x8048
13502+#define GL_INTENSITY 0x8049
13503+#define GL_INTENSITY4 0x804A
13504+#define GL_INTENSITY8 0x804B
13505+#define GL_INTENSITY12 0x804C
13506+#define GL_INTENSITY16 0x804D
13507+#define GL_R3_G3_B2 0x2A10
13508+#define GL_RGB4 0x804F
13509+#define GL_RGB5 0x8050
13510+#define GL_RGB8 0x8051
13511+#define GL_RGB10 0x8052
13512+#define GL_RGB12 0x8053
13513+#define GL_RGB16 0x8054
13514+#define GL_RGBA2 0x8055
13515+#define GL_RGBA4 0x8056
13516+#define GL_RGB5_A1 0x8057
13517+#define GL_RGBA8 0x8058
13518+#define GL_RGB10_A2 0x8059
13519+#define GL_RGBA12 0x805A
13520+#define GL_RGBA16 0x805B
13521+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
13522+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
13523+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
13524+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
13525+
13526+
13527+
13528+/*
13529+ * Miscellaneous
13530+ */
13531+
13532+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
13533+
13534+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
13535+
13536+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
13537+
13538+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
13539+
13540+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
13541+
13542+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
13543+
13544+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
13545+
13546+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
13547+
13548+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
13549+
13550+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
13551+
13552+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
13553+
13554+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
13555+
13556+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
13557+
13558+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
13559+
13560+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
13561+
13562+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
13563+
13564+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
13565+
13566+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
13567+
13568+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
13569+
13570+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
13571+
13572+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
13573+
13574+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
13575+
13576+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
13577+
13578+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
13579+
13580+GLAPI void GLAPIENTRY glEnable( GLenum cap );
13581+
13582+GLAPI void GLAPIENTRY glDisable( GLenum cap );
13583+
13584+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
13585+
13586+
13587+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
13588+
13589+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
13590+
13591+
13592+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
13593+
13594+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
13595+
13596+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
13597+
13598+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
13599+
13600+
13601+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
13602+
13603+GLAPI void GLAPIENTRY glPopAttrib( void );
13604+
13605+
13606+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
13607+
13608+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
13609+
13610+
13611+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
13612+
13613+GLAPI GLenum GLAPIENTRY glGetError( void );
13614+
13615+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
13616+
13617+GLAPI void GLAPIENTRY glFinish( void );
13618+
13619+GLAPI void GLAPIENTRY glFlush( void );
13620+
13621+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
13622+
13623+
13624+/*
13625+ * Depth Buffer
13626+ */
13627+
13628+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
13629+
13630+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
13631+
13632+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
13633+
13634+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
13635+
13636+
13637+/*
13638+ * Accumulation Buffer
13639+ */
13640+
13641+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
13642+
13643+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
13644+
13645+
13646+/*
13647+ * Transformation
13648+ */
13649+
13650+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
13651+
13652+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
13653+ GLdouble bottom, GLdouble top,
13654+ GLdouble near_val, GLdouble far_val );
13655+
13656+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
13657+ GLdouble bottom, GLdouble top,
13658+ GLdouble near_val, GLdouble far_val );
13659+
13660+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
13661+ GLsizei width, GLsizei height );
13662+
13663+GLAPI void GLAPIENTRY glPushMatrix( void );
13664+
13665+GLAPI void GLAPIENTRY glPopMatrix( void );
13666+
13667+GLAPI void GLAPIENTRY glLoadIdentity( void );
13668+
13669+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
13670+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
13671+
13672+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
13673+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
13674+
13675+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
13676+ GLdouble x, GLdouble y, GLdouble z );
13677+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
13678+ GLfloat x, GLfloat y, GLfloat z );
13679+
13680+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
13681+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
13682+
13683+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
13684+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
13685+
13686+
13687+/*
13688+ * Display Lists
13689+ */
13690+
13691+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
13692+
13693+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
13694+
13695+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
13696+
13697+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
13698+
13699+GLAPI void GLAPIENTRY glEndList( void );
13700+
13701+GLAPI void GLAPIENTRY glCallList( GLuint list );
13702+
13703+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
13704+ const GLvoid *lists );
13705+
13706+GLAPI void GLAPIENTRY glListBase( GLuint base );
13707+
13708+
13709+/*
13710+ * Drawing Functions
13711+ */
13712+
13713+GLAPI void GLAPIENTRY glBegin( GLenum mode );
13714+
13715+GLAPI void GLAPIENTRY glEnd( void );
13716+
13717+
13718+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
13719+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
13720+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
13721+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
13722+
13723+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
13724+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
13725+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
13726+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
13727+
13728+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13729+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13730+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
13731+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
13732+
13733+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
13734+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
13735+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
13736+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
13737+
13738+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
13739+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
13740+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
13741+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
13742+
13743+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
13744+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
13745+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
13746+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
13747+
13748+
13749+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
13750+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
13751+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
13752+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
13753+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
13754+
13755+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
13756+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
13757+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
13758+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
13759+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
13760+
13761+
13762+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
13763+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
13764+GLAPI void GLAPIENTRY glIndexi( GLint c );
13765+GLAPI void GLAPIENTRY glIndexs( GLshort c );
13766+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
13767+
13768+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
13769+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
13770+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
13771+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
13772+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
13773+
13774+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
13775+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
13776+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
13777+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
13778+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
13779+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
13780+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
13781+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
13782+
13783+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
13784+ GLbyte blue, GLbyte alpha );
13785+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
13786+ GLdouble blue, GLdouble alpha );
13787+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
13788+ GLfloat blue, GLfloat alpha );
13789+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
13790+ GLint blue, GLint alpha );
13791+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
13792+ GLshort blue, GLshort alpha );
13793+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
13794+ GLubyte blue, GLubyte alpha );
13795+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
13796+ GLuint blue, GLuint alpha );
13797+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
13798+ GLushort blue, GLushort alpha );
13799+
13800+
13801+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
13802+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
13803+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
13804+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
13805+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
13806+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
13807+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
13808+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
13809+
13810+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
13811+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
13812+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
13813+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
13814+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
13815+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
13816+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
13817+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
13818+
13819+
13820+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
13821+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
13822+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
13823+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
13824+
13825+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
13826+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
13827+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
13828+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
13829+
13830+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
13831+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
13832+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
13833+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
13834+
13835+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
13836+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
13837+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
13838+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
13839+
13840+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
13841+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
13842+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
13843+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
13844+
13845+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
13846+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
13847+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
13848+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
13849+
13850+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
13851+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
13852+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
13853+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
13854+
13855+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
13856+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
13857+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
13858+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
13859+
13860+
13861+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
13862+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
13863+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
13864+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
13865+
13866+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
13867+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
13868+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
13869+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
13870+
13871+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13872+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13873+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
13874+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
13875+
13876+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
13877+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
13878+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
13879+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
13880+
13881+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
13882+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
13883+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
13884+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
13885+
13886+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
13887+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
13888+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
13889+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
13890+
13891+
13892+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
13893+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
13894+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
13895+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
13896+
13897+
13898+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
13899+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
13900+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
13901+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
13902+
13903+
13904+/*
13905+ * Vertex Arrays (1.1)
13906+ */
13907+
13908+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
13909+ GLsizei stride, const GLvoid *ptr );
13910+
13911+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
13912+ const GLvoid *ptr );
13913+
13914+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
13915+ GLsizei stride, const GLvoid *ptr );
13916+
13917+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
13918+ const GLvoid *ptr );
13919+
13920+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
13921+ GLsizei stride, const GLvoid *ptr );
13922+
13923+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
13924+
13925+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
13926+
13927+GLAPI void GLAPIENTRY glArrayElement( GLint i );
13928+
13929+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
13930+
13931+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
13932+ GLenum type, const GLvoid *indices );
13933+
13934+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
13935+ const GLvoid *pointer );
13936+
13937+/*
13938+ * Lighting
13939+ */
13940+
13941+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
13942+
13943+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
13944+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
13945+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
13946+ const GLfloat *params );
13947+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
13948+ const GLint *params );
13949+
13950+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
13951+ GLfloat *params );
13952+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
13953+ GLint *params );
13954+
13955+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
13956+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
13957+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
13958+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
13959+
13960+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
13961+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
13962+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
13963+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
13964+
13965+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
13966+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
13967+
13968+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
13969+
13970+
13971+/*
13972+ * Raster functions
13973+ */
13974+
13975+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
13976+
13977+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
13978+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
13979+
13980+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
13981+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
13982+
13983+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
13984+ const GLfloat *values );
13985+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
13986+ const GLuint *values );
13987+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
13988+ const GLushort *values );
13989+
13990+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
13991+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
13992+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
13993+
13994+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
13995+ GLfloat xorig, GLfloat yorig,
13996+ GLfloat xmove, GLfloat ymove,
13997+ const GLubyte *bitmap );
13998+
13999+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
14000+ GLsizei width, GLsizei height,
14001+ GLenum format, GLenum type,
14002+ GLvoid *pixels );
14003+
14004+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
14005+ GLenum format, GLenum type,
14006+ const GLvoid *pixels );
14007+
14008+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
14009+ GLsizei width, GLsizei height,
14010+ GLenum type );
14011+
14012+/*
14013+ * Stenciling
14014+ */
14015+
14016+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
14017+
14018+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
14019+
14020+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
14021+
14022+GLAPI void GLAPIENTRY glClearStencil( GLint s );
14023+
14024+
14025+
14026+/*
14027+ * Texture mapping
14028+ */
14029+
14030+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
14031+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
14032+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
14033+
14034+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
14035+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
14036+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
14037+
14038+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
14039+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
14040+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
14041+
14042+
14043+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
14044+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
14045+
14046+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
14047+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
14048+
14049+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
14050+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
14051+
14052+
14053+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
14054+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
14055+
14056+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
14057+ const GLfloat *params );
14058+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
14059+ const GLint *params );
14060+
14061+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
14062+ GLenum pname, GLfloat *params);
14063+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
14064+ GLenum pname, GLint *params );
14065+
14066+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
14067+ GLenum pname, GLfloat *params );
14068+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
14069+ GLenum pname, GLint *params );
14070+
14071+
14072+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
14073+ GLint internalFormat,
14074+ GLsizei width, GLint border,
14075+ GLenum format, GLenum type,
14076+ const GLvoid *pixels );
14077+
14078+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
14079+ GLint internalFormat,
14080+ GLsizei width, GLsizei height,
14081+ GLint border, GLenum format, GLenum type,
14082+ const GLvoid *pixels );
14083+
14084+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
14085+ GLenum format, GLenum type,
14086+ GLvoid *pixels );
14087+
14088+
14089+/* 1.1 functions */
14090+
14091+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
14092+
14093+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
14094+
14095+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
14096+
14097+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
14098+ const GLuint *textures,
14099+ const GLclampf *priorities );
14100+
14101+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
14102+ const GLuint *textures,
14103+ GLboolean *residences );
14104+
14105+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
14106+
14107+
14108+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
14109+ GLint xoffset,
14110+ GLsizei width, GLenum format,
14111+ GLenum type, const GLvoid *pixels );
14112+
14113+
14114+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
14115+ GLint xoffset, GLint yoffset,
14116+ GLsizei width, GLsizei height,
14117+ GLenum format, GLenum type,
14118+ const GLvoid *pixels );
14119+
14120+
14121+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
14122+ GLenum internalformat,
14123+ GLint x, GLint y,
14124+ GLsizei width, GLint border );
14125+
14126+
14127+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
14128+ GLenum internalformat,
14129+ GLint x, GLint y,
14130+ GLsizei width, GLsizei height,
14131+ GLint border );
14132+
14133+
14134+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
14135+ GLint xoffset, GLint x, GLint y,
14136+ GLsizei width );
14137+
14138+
14139+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
14140+ GLint xoffset, GLint yoffset,
14141+ GLint x, GLint y,
14142+ GLsizei width, GLsizei height );
14143+
14144+
14145+/*
14146+ * Evaluators
14147+ */
14148+
14149+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
14150+ GLint stride,
14151+ GLint order, const GLdouble *points );
14152+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
14153+ GLint stride,
14154+ GLint order, const GLfloat *points );
14155+
14156+GLAPI void GLAPIENTRY glMap2d( GLenum target,
14157+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
14158+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
14159+ const GLdouble *points );
14160+GLAPI void GLAPIENTRY glMap2f( GLenum target,
14161+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
14162+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
14163+ const GLfloat *points );
14164+
14165+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
14166+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
14167+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
14168+
14169+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
14170+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
14171+
14172+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
14173+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
14174+
14175+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
14176+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
14177+
14178+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
14179+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
14180+
14181+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
14182+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
14183+
14184+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
14185+ GLint vn, GLdouble v1, GLdouble v2 );
14186+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
14187+ GLint vn, GLfloat v1, GLfloat v2 );
14188+
14189+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
14190+
14191+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
14192+
14193+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
14194+
14195+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
14196+
14197+
14198+/*
14199+ * Fog
14200+ */
14201+
14202+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
14203+
14204+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
14205+
14206+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
14207+
14208+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
14209+
14210+
14211+/*
14212+ * Selection and Feedback
14213+ */
14214+
14215+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
14216+
14217+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
14218+
14219+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
14220+
14221+GLAPI void GLAPIENTRY glInitNames( void );
14222+
14223+GLAPI void GLAPIENTRY glLoadName( GLuint name );
14224+
14225+GLAPI void GLAPIENTRY glPushName( GLuint name );
14226+
14227+GLAPI void GLAPIENTRY glPopName( void );
14228+
14229+
14230+
14231+/*
14232+ * OpenGL 1.2
14233+ */
14234+
14235+#define GL_RESCALE_NORMAL 0x803A
14236+#define GL_CLAMP_TO_EDGE 0x812F
14237+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14238+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14239+#define GL_BGR 0x80E0
14240+#define GL_BGRA 0x80E1
14241+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14242+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14243+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14244+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14245+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14246+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14247+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14248+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14249+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14250+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14251+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14252+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14253+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14254+#define GL_SINGLE_COLOR 0x81F9
14255+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14256+#define GL_TEXTURE_MIN_LOD 0x813A
14257+#define GL_TEXTURE_MAX_LOD 0x813B
14258+#define GL_TEXTURE_BASE_LEVEL 0x813C
14259+#define GL_TEXTURE_MAX_LEVEL 0x813D
14260+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14261+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14262+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14263+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14264+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14265+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14266+#define GL_PACK_SKIP_IMAGES 0x806B
14267+#define GL_PACK_IMAGE_HEIGHT 0x806C
14268+#define GL_UNPACK_SKIP_IMAGES 0x806D
14269+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14270+#define GL_TEXTURE_3D 0x806F
14271+#define GL_PROXY_TEXTURE_3D 0x8070
14272+#define GL_TEXTURE_DEPTH 0x8071
14273+#define GL_TEXTURE_WRAP_R 0x8072
14274+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14275+#define GL_TEXTURE_BINDING_3D 0x806A
14276+
14277+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
14278+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
14279+
14280+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
14281+ GLint internalFormat,
14282+ GLsizei width, GLsizei height,
14283+ GLsizei depth, GLint border,
14284+ GLenum format, GLenum type,
14285+ const GLvoid *pixels );
14286+
14287+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
14288+ GLint xoffset, GLint yoffset,
14289+ GLint zoffset, GLsizei width,
14290+ GLsizei height, GLsizei depth,
14291+ GLenum format,
14292+ GLenum type, const GLvoid *pixels);
14293+
14294+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
14295+ GLint xoffset, GLint yoffset,
14296+ GLint zoffset, GLint x,
14297+ GLint y, GLsizei width,
14298+ GLsizei height );
14299+
14300+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
14301+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);
14302+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);
14303+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
14304+
14305+
14306+/*
14307+ * GL_ARB_imaging
14308+ */
14309+
14310+#define GL_CONSTANT_COLOR 0x8001
14311+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14312+#define GL_CONSTANT_ALPHA 0x8003
14313+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14314+#define GL_COLOR_TABLE 0x80D0
14315+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14316+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14317+#define GL_PROXY_COLOR_TABLE 0x80D3
14318+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14319+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14320+#define GL_COLOR_TABLE_SCALE 0x80D6
14321+#define GL_COLOR_TABLE_BIAS 0x80D7
14322+#define GL_COLOR_TABLE_FORMAT 0x80D8
14323+#define GL_COLOR_TABLE_WIDTH 0x80D9
14324+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14325+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14326+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14327+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14328+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14329+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
14330+#define GL_CONVOLUTION_1D 0x8010
14331+#define GL_CONVOLUTION_2D 0x8011
14332+#define GL_SEPARABLE_2D 0x8012
14333+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14334+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14335+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14336+#define GL_REDUCE 0x8016
14337+#define GL_CONVOLUTION_FORMAT 0x8017
14338+#define GL_CONVOLUTION_WIDTH 0x8018
14339+#define GL_CONVOLUTION_HEIGHT 0x8019
14340+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14341+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14342+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14343+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14344+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14345+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14346+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14347+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14348+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14349+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14350+#define GL_CONSTANT_BORDER 0x8151
14351+#define GL_REPLICATE_BORDER 0x8153
14352+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
14353+#define GL_COLOR_MATRIX 0x80B1
14354+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14355+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14356+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14357+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14358+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14359+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14360+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14361+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14362+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14363+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14364+#define GL_HISTOGRAM 0x8024
14365+#define GL_PROXY_HISTOGRAM 0x8025
14366+#define GL_HISTOGRAM_WIDTH 0x8026
14367+#define GL_HISTOGRAM_FORMAT 0x8027
14368+#define GL_HISTOGRAM_RED_SIZE 0x8028
14369+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14370+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14371+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14372+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14373+#define GL_HISTOGRAM_SINK 0x802D
14374+#define GL_MINMAX 0x802E
14375+#define GL_MINMAX_FORMAT 0x802F
14376+#define GL_MINMAX_SINK 0x8030
14377+#define GL_TABLE_TOO_LARGE 0x8031
14378+#define GL_BLEND_EQUATION 0x8009
14379+#define GL_MIN 0x8007
14380+#define GL_MAX 0x8008
14381+#define GL_FUNC_ADD 0x8006
14382+#define GL_FUNC_SUBTRACT 0x800A
14383+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14384+#define GL_BLEND_COLOR 0x8005
14385+
14386+
14387+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
14388+ GLsizei width, GLenum format,
14389+ GLenum type, const GLvoid *table );
14390+
14391+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
14392+ GLsizei start, GLsizei count,
14393+ GLenum format, GLenum type,
14394+ const GLvoid *data );
14395+
14396+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
14397+ const GLint *params);
14398+
14399+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
14400+ const GLfloat *params);
14401+
14402+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
14403+ GLint x, GLint y, GLsizei width );
14404+
14405+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
14406+ GLint x, GLint y, GLsizei width );
14407+
14408+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
14409+ GLenum type, GLvoid *table );
14410+
14411+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
14412+ GLfloat *params );
14413+
14414+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
14415+ GLint *params );
14416+
14417+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
14418+
14419+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
14420+ GLclampf blue, GLclampf alpha );
14421+
14422+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
14423+ GLenum internalformat, GLboolean sink );
14424+
14425+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
14426+
14427+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
14428+ GLenum format, GLenum type,
14429+ GLvoid *values );
14430+
14431+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
14432+ GLfloat *params );
14433+
14434+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
14435+ GLint *params );
14436+
14437+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
14438+ GLboolean sink );
14439+
14440+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
14441+
14442+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
14443+ GLenum format, GLenum types,
14444+ GLvoid *values );
14445+
14446+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
14447+ GLfloat *params );
14448+
14449+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
14450+ GLint *params );
14451+
14452+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
14453+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
14454+ const GLvoid *image );
14455+
14456+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
14457+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14458+ GLenum type, const GLvoid *image );
14459+
14460+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
14461+ GLfloat params );
14462+
14463+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
14464+ const GLfloat *params );
14465+
14466+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
14467+ GLint params );
14468+
14469+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
14470+ const GLint *params );
14471+
14472+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
14473+ GLenum internalformat, GLint x, GLint y, GLsizei width );
14474+
14475+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
14476+ GLenum internalformat, GLint x, GLint y, GLsizei width,
14477+ GLsizei height);
14478+
14479+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
14480+ GLenum type, GLvoid *image );
14481+
14482+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
14483+ GLfloat *params );
14484+
14485+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
14486+ GLint *params );
14487+
14488+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
14489+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14490+ GLenum type, const GLvoid *row, const GLvoid *column );
14491+
14492+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
14493+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
14494+
14495+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
14496+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
14497+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
14498+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14499+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14500+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14501+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
14502+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14503+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14504+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
14505+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
14506+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
14507+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
14508+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
14509+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14510+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
14511+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14512+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14513+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
14514+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
14515+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14516+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14517+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
14518+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
14519+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14520+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14521+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14522+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14523+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14524+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14525+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
14526+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
14527+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
14528+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
14529+
14530+
14531+
14532+/*
14533+ * OpenGL 1.3
14534+ */
14535+
14536+/* multitexture */
14537+#define GL_TEXTURE0 0x84C0
14538+#define GL_TEXTURE1 0x84C1
14539+#define GL_TEXTURE2 0x84C2
14540+#define GL_TEXTURE3 0x84C3
14541+#define GL_TEXTURE4 0x84C4
14542+#define GL_TEXTURE5 0x84C5
14543+#define GL_TEXTURE6 0x84C6
14544+#define GL_TEXTURE7 0x84C7
14545+#define GL_TEXTURE8 0x84C8
14546+#define GL_TEXTURE9 0x84C9
14547+#define GL_TEXTURE10 0x84CA
14548+#define GL_TEXTURE11 0x84CB
14549+#define GL_TEXTURE12 0x84CC
14550+#define GL_TEXTURE13 0x84CD
14551+#define GL_TEXTURE14 0x84CE
14552+#define GL_TEXTURE15 0x84CF
14553+#define GL_TEXTURE16 0x84D0
14554+#define GL_TEXTURE17 0x84D1
14555+#define GL_TEXTURE18 0x84D2
14556+#define GL_TEXTURE19 0x84D3
14557+#define GL_TEXTURE20 0x84D4
14558+#define GL_TEXTURE21 0x84D5
14559+#define GL_TEXTURE22 0x84D6
14560+#define GL_TEXTURE23 0x84D7
14561+#define GL_TEXTURE24 0x84D8
14562+#define GL_TEXTURE25 0x84D9
14563+#define GL_TEXTURE26 0x84DA
14564+#define GL_TEXTURE27 0x84DB
14565+#define GL_TEXTURE28 0x84DC
14566+#define GL_TEXTURE29 0x84DD
14567+#define GL_TEXTURE30 0x84DE
14568+#define GL_TEXTURE31 0x84DF
14569+#define GL_ACTIVE_TEXTURE 0x84E0
14570+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14571+#define GL_MAX_TEXTURE_UNITS 0x84E2
14572+/* texture_cube_map */
14573+#define GL_NORMAL_MAP 0x8511
14574+#define GL_REFLECTION_MAP 0x8512
14575+#define GL_TEXTURE_CUBE_MAP 0x8513
14576+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14577+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14578+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14579+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14580+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14581+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14582+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14583+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14584+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14585+/* texture_compression */
14586+#define GL_COMPRESSED_ALPHA 0x84E9
14587+#define GL_COMPRESSED_LUMINANCE 0x84EA
14588+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14589+#define GL_COMPRESSED_INTENSITY 0x84EC
14590+#define GL_COMPRESSED_RGB 0x84ED
14591+#define GL_COMPRESSED_RGBA 0x84EE
14592+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14593+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14594+#define GL_TEXTURE_COMPRESSED 0x86A1
14595+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14596+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14597+/* multisample */
14598+#define GL_MULTISAMPLE 0x809D
14599+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14600+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14601+#define GL_SAMPLE_COVERAGE 0x80A0
14602+#define GL_SAMPLE_BUFFERS 0x80A8
14603+#define GL_SAMPLES 0x80A9
14604+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14605+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14606+#define GL_MULTISAMPLE_BIT 0x20000000
14607+/* transpose_matrix */
14608+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14609+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14610+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14611+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14612+/* texture_env_combine */
14613+#define GL_COMBINE 0x8570
14614+#define GL_COMBINE_RGB 0x8571
14615+#define GL_COMBINE_ALPHA 0x8572
14616+#define GL_SOURCE0_RGB 0x8580
14617+#define GL_SOURCE1_RGB 0x8581
14618+#define GL_SOURCE2_RGB 0x8582
14619+#define GL_SOURCE0_ALPHA 0x8588
14620+#define GL_SOURCE1_ALPHA 0x8589
14621+#define GL_SOURCE2_ALPHA 0x858A
14622+#define GL_OPERAND0_RGB 0x8590
14623+#define GL_OPERAND1_RGB 0x8591
14624+#define GL_OPERAND2_RGB 0x8592
14625+#define GL_OPERAND0_ALPHA 0x8598
14626+#define GL_OPERAND1_ALPHA 0x8599
14627+#define GL_OPERAND2_ALPHA 0x859A
14628+#define GL_RGB_SCALE 0x8573
14629+#define GL_ADD_SIGNED 0x8574
14630+#define GL_INTERPOLATE 0x8575
14631+#define GL_SUBTRACT 0x84E7
14632+#define GL_CONSTANT 0x8576
14633+#define GL_PRIMARY_COLOR 0x8577
14634+#define GL_PREVIOUS 0x8578
14635+/* texture_env_dot3 */
14636+#define GL_DOT3_RGB 0x86AE
14637+#define GL_DOT3_RGBA 0x86AF
14638+/* texture_border_clamp */
14639+#define GL_CLAMP_TO_BORDER 0x812D
14640+
14641+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
14642+
14643+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
14644+
14645+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
14646+
14647+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
14648+
14649+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
14650+
14651+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
14652+
14653+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
14654+
14655+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 );
14656+
14657+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
14658+
14659+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
14660+
14661+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
14662+
14663+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
14664+
14665+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
14666+
14667+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
14668+
14669+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
14670+
14671+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
14672+
14673+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
14674+
14675+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
14676+
14677+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
14678+
14679+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
14680+
14681+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
14682+
14683+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
14684+
14685+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
14686+
14687+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
14688+
14689+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
14690+
14691+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
14692+
14693+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
14694+
14695+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
14696+
14697+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
14698+
14699+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
14700+
14701+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
14702+
14703+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
14704+
14705+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
14706+
14707+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
14708+
14709+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
14710+
14711+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
14712+
14713+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
14714+
14715+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
14716+
14717+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
14718+
14719+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
14720+
14721+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
14722+
14723+
14724+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
14725+
14726+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
14727+
14728+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
14729+
14730+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
14731+
14732+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
14733+
14734+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
14735+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
14736+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
14737+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
14738+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
14739+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
14740+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
14741+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
14742+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
14743+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
14744+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
14745+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
14746+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
14747+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
14748+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
14749+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
14750+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
14751+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
14752+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14753+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
14754+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14755+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
14756+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
14757+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
14758+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14759+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
14760+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14761+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
14762+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14763+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
14764+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14765+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
14766+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14767+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
14768+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14769+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14770+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14771+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14772+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
14773+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
14774+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
14775+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
14776+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);
14777+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
14778+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
14779+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
14780+
14781+
14782+/*
14783+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
14784+ */
14785+#ifndef GL_ARB_multitexture
14786+#define GL_ARB_multitexture 1
14787+
14788+#define GL_TEXTURE0_ARB 0x84C0
14789+#define GL_TEXTURE1_ARB 0x84C1
14790+#define GL_TEXTURE2_ARB 0x84C2
14791+#define GL_TEXTURE3_ARB 0x84C3
14792+#define GL_TEXTURE4_ARB 0x84C4
14793+#define GL_TEXTURE5_ARB 0x84C5
14794+#define GL_TEXTURE6_ARB 0x84C6
14795+#define GL_TEXTURE7_ARB 0x84C7
14796+#define GL_TEXTURE8_ARB 0x84C8
14797+#define GL_TEXTURE9_ARB 0x84C9
14798+#define GL_TEXTURE10_ARB 0x84CA
14799+#define GL_TEXTURE11_ARB 0x84CB
14800+#define GL_TEXTURE12_ARB 0x84CC
14801+#define GL_TEXTURE13_ARB 0x84CD
14802+#define GL_TEXTURE14_ARB 0x84CE
14803+#define GL_TEXTURE15_ARB 0x84CF
14804+#define GL_TEXTURE16_ARB 0x84D0
14805+#define GL_TEXTURE17_ARB 0x84D1
14806+#define GL_TEXTURE18_ARB 0x84D2
14807+#define GL_TEXTURE19_ARB 0x84D3
14808+#define GL_TEXTURE20_ARB 0x84D4
14809+#define GL_TEXTURE21_ARB 0x84D5
14810+#define GL_TEXTURE22_ARB 0x84D6
14811+#define GL_TEXTURE23_ARB 0x84D7
14812+#define GL_TEXTURE24_ARB 0x84D8
14813+#define GL_TEXTURE25_ARB 0x84D9
14814+#define GL_TEXTURE26_ARB 0x84DA
14815+#define GL_TEXTURE27_ARB 0x84DB
14816+#define GL_TEXTURE28_ARB 0x84DC
14817+#define GL_TEXTURE29_ARB 0x84DD
14818+#define GL_TEXTURE30_ARB 0x84DE
14819+#define GL_TEXTURE31_ARB 0x84DF
14820+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14821+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14822+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14823+
14824+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
14825+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
14826+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
14827+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
14828+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
14829+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
14830+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
14831+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
14832+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
14833+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
14834+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
14835+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
14836+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
14837+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
14838+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
14839+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
14840+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
14841+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
14842+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
14843+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
14844+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
14845+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
14846+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
14847+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
14848+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
14849+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
14850+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14851+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
14852+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14853+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
14854+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
14855+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
14856+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14857+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
14858+
14859+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
14860+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
14861+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
14862+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
14863+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
14864+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
14865+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
14866+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
14867+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
14868+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
14869+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
14870+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
14871+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
14872+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
14873+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
14874+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
14875+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
14876+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
14877+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14878+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
14879+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14880+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
14881+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
14882+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
14883+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14884+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
14885+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14886+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
14887+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14888+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
14889+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14890+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
14891+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14892+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
14893+
14894+#endif /* GL_ARB_multitexture */
14895+
14896+
14897+
14898+/*
14899+ * Define this token if you want "old-style" header file behaviour (extensions
14900+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
14901+ */
14902+#if defined(GL_GLEXT_LEGACY)
14903+
14904+/* All extensions that used to be here are now found in glext.h */
14905+
14906+#else /* GL_GLEXT_LEGACY */
14907+
14908+#include <mesa_glext.h>
14909+
14910+#endif /* GL_GLEXT_LEGACY */
14911+
14912+
14913+
14914+#if GL_ARB_shader_objects
14915+
14916+#ifndef GL_MESA_shader_debug
14917+#define GL_MESA_shader_debug 1
14918+
14919+#define GL_DEBUG_OBJECT_MESA 0x8759
14920+#define GL_DEBUG_PRINT_MESA 0x875A
14921+#define GL_DEBUG_ASSERT_MESA 0x875B
14922+
14923+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
14924+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14925+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
14926+ GLsizei *length, GLcharARB *debugLog);
14927+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14928+
14929+#endif /* GL_MESA_shader_debug */
14930+
14931+#endif /* GL_ARB_shader_objects */
14932+
14933+
14934+/*
14935+ * ???. GL_MESA_packed_depth_stencil
14936+ * XXX obsolete
14937+ */
14938+#ifndef GL_MESA_packed_depth_stencil
14939+#define GL_MESA_packed_depth_stencil 1
14940+
14941+#define GL_DEPTH_STENCIL_MESA 0x8750
14942+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
14943+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
14944+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
14945+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
14946+
14947+#endif /* GL_MESA_packed_depth_stencil */
14948+
14949+
14950+#ifndef GL_MESA_program_debug
14951+#define GL_MESA_program_debug 1
14952+
14953+#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
14954+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
14955+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
14956+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
14957+#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
14958+#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
14959+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
14960+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
14961+
14962+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
14963+
14964+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
14965+
14966+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
14967+
14968+#endif /* GL_MESA_program_debug */
14969+
14970+
14971+#ifndef GL_ATI_blend_equation_separate
14972+#define GL_ATI_blend_equation_separate 1
14973+
14974+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
14975+
14976+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
14977+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
14978+
14979+#endif /* GL_ATI_blend_equation_separate */
14980+
14981+
14982+
14983+/**
14984+ ** NOTE!!!!! If you add new functions to this file, or update
14985+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
14986+ ** in that file for details.
14987+ **/
14988+
14989+
14990+
14991+/**********************************************************************
14992+ * Begin system-specific stuff
14993+ */
14994+#if defined(PRAGMA_EXPORT_SUPPORTED)
14995+#pragma export off
14996+#endif
14997+
14998+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
14999+#pragma import off
15000+#endif
15001+/*
15002+ * End system-specific stuff
15003+ **********************************************************************/
15004+
15005+
15006+#ifdef __cplusplus
15007+}
15008+#endif
15009+
15010+#endif /* __gl_h_ */
15011diff --git a/target-i386/mesa_glext.h b/target-i386/mesa_glext.h
15012new file mode 100644
15013index 0000000..f8cf2d2
15014--- /dev/null
15015+++ b/target-i386/mesa_glext.h
15016@@ -0,0 +1,7279 @@
15017+#ifndef __glext_h_
15018+#define __glext_h_
15019+
15020+#ifdef __cplusplus
15021+extern "C" {
15022+#endif
15023+
15024+/*
15025+** Copyright (c) 2007 The Khronos Group Inc.
15026+**
15027+** Permission is hereby granted, free of charge, to any person obtaining a
15028+** copy of this software and/or associated documentation files (the
15029+** "Materials"), to deal in the Materials without restriction, including
15030+** without limitation the rights to use, copy, modify, merge, publish,
15031+** distribute, sublicense, and/or sell copies of the Materials, and to
15032+** permit persons to whom the Materials are furnished to do so, subject to
15033+** the following conditions:
15034+**
15035+** The above copyright notice and this permission notice shall be included
15036+** in all copies or substantial portions of the Materials.
15037+**
15038+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15039+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15040+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15041+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
15042+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
15043+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15044+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
15045+*/
15046+
15047+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
15048+#define WIN32_LEAN_AND_MEAN 1
15049+#include <windows.h>
15050+#endif
15051+
15052+#ifndef APIENTRY
15053+#define APIENTRY
15054+#endif
15055+#ifndef APIENTRYP
15056+#define APIENTRYP APIENTRY *
15057+#endif
15058+#ifndef GLAPI
15059+#define GLAPI extern
15060+#endif
15061+
15062+/*************************************************************/
15063+
15064+/* Header file version number, required by OpenGL ABI for Linux */
15065+/* glext.h last updated 2007/02/12 */
15066+/* Current version at http://www.opengl.org/registry/ */
15067+#define GL_GLEXT_VERSION 39
15068+
15069+#ifndef GL_VERSION_1_2
15070+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
15071+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
15072+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
15073+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
15074+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
15075+#define GL_RESCALE_NORMAL 0x803A
15076+#define GL_TEXTURE_BINDING_3D 0x806A
15077+#define GL_PACK_SKIP_IMAGES 0x806B
15078+#define GL_PACK_IMAGE_HEIGHT 0x806C
15079+#define GL_UNPACK_SKIP_IMAGES 0x806D
15080+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
15081+#define GL_TEXTURE_3D 0x806F
15082+#define GL_PROXY_TEXTURE_3D 0x8070
15083+#define GL_TEXTURE_DEPTH 0x8071
15084+#define GL_TEXTURE_WRAP_R 0x8072
15085+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
15086+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
15087+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
15088+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
15089+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
15090+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
15091+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
15092+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
15093+#define GL_BGR 0x80E0
15094+#define GL_BGRA 0x80E1
15095+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
15096+#define GL_MAX_ELEMENTS_INDICES 0x80E9
15097+#define GL_CLAMP_TO_EDGE 0x812F
15098+#define GL_TEXTURE_MIN_LOD 0x813A
15099+#define GL_TEXTURE_MAX_LOD 0x813B
15100+#define GL_TEXTURE_BASE_LEVEL 0x813C
15101+#define GL_TEXTURE_MAX_LEVEL 0x813D
15102+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
15103+#define GL_SINGLE_COLOR 0x81F9
15104+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
15105+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
15106+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
15107+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
15108+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
15109+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
15110+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
15111+#endif
15112+
15113+#ifndef GL_ARB_imaging
15114+#define GL_CONSTANT_COLOR 0x8001
15115+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
15116+#define GL_CONSTANT_ALPHA 0x8003
15117+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
15118+#define GL_BLEND_COLOR 0x8005
15119+#define GL_FUNC_ADD 0x8006
15120+#define GL_MIN 0x8007
15121+#define GL_MAX 0x8008
15122+#define GL_BLEND_EQUATION 0x8009
15123+#define GL_FUNC_SUBTRACT 0x800A
15124+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
15125+#define GL_CONVOLUTION_1D 0x8010
15126+#define GL_CONVOLUTION_2D 0x8011
15127+#define GL_SEPARABLE_2D 0x8012
15128+#define GL_CONVOLUTION_BORDER_MODE 0x8013
15129+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
15130+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
15131+#define GL_REDUCE 0x8016
15132+#define GL_CONVOLUTION_FORMAT 0x8017
15133+#define GL_CONVOLUTION_WIDTH 0x8018
15134+#define GL_CONVOLUTION_HEIGHT 0x8019
15135+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
15136+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
15137+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
15138+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
15139+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
15140+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
15141+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
15142+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
15143+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
15144+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
15145+#define GL_HISTOGRAM 0x8024
15146+#define GL_PROXY_HISTOGRAM 0x8025
15147+#define GL_HISTOGRAM_WIDTH 0x8026
15148+#define GL_HISTOGRAM_FORMAT 0x8027
15149+#define GL_HISTOGRAM_RED_SIZE 0x8028
15150+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
15151+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
15152+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
15153+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
15154+#define GL_HISTOGRAM_SINK 0x802D
15155+#define GL_MINMAX 0x802E
15156+#define GL_MINMAX_FORMAT 0x802F
15157+#define GL_MINMAX_SINK 0x8030
15158+#define GL_TABLE_TOO_LARGE 0x8031
15159+#define GL_COLOR_MATRIX 0x80B1
15160+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
15161+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
15162+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
15163+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
15164+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
15165+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
15166+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
15167+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
15168+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
15169+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
15170+#define GL_COLOR_TABLE 0x80D0
15171+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
15172+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
15173+#define GL_PROXY_COLOR_TABLE 0x80D3
15174+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
15175+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
15176+#define GL_COLOR_TABLE_SCALE 0x80D6
15177+#define GL_COLOR_TABLE_BIAS 0x80D7
15178+#define GL_COLOR_TABLE_FORMAT 0x80D8
15179+#define GL_COLOR_TABLE_WIDTH 0x80D9
15180+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
15181+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
15182+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
15183+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
15184+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
15185+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
15186+#define GL_CONSTANT_BORDER 0x8151
15187+#define GL_REPLICATE_BORDER 0x8153
15188+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
15189+#endif
15190+
15191+#ifndef GL_VERSION_1_3
15192+#define GL_TEXTURE0 0x84C0
15193+#define GL_TEXTURE1 0x84C1
15194+#define GL_TEXTURE2 0x84C2
15195+#define GL_TEXTURE3 0x84C3
15196+#define GL_TEXTURE4 0x84C4
15197+#define GL_TEXTURE5 0x84C5
15198+#define GL_TEXTURE6 0x84C6
15199+#define GL_TEXTURE7 0x84C7
15200+#define GL_TEXTURE8 0x84C8
15201+#define GL_TEXTURE9 0x84C9
15202+#define GL_TEXTURE10 0x84CA
15203+#define GL_TEXTURE11 0x84CB
15204+#define GL_TEXTURE12 0x84CC
15205+#define GL_TEXTURE13 0x84CD
15206+#define GL_TEXTURE14 0x84CE
15207+#define GL_TEXTURE15 0x84CF
15208+#define GL_TEXTURE16 0x84D0
15209+#define GL_TEXTURE17 0x84D1
15210+#define GL_TEXTURE18 0x84D2
15211+#define GL_TEXTURE19 0x84D3
15212+#define GL_TEXTURE20 0x84D4
15213+#define GL_TEXTURE21 0x84D5
15214+#define GL_TEXTURE22 0x84D6
15215+#define GL_TEXTURE23 0x84D7
15216+#define GL_TEXTURE24 0x84D8
15217+#define GL_TEXTURE25 0x84D9
15218+#define GL_TEXTURE26 0x84DA
15219+#define GL_TEXTURE27 0x84DB
15220+#define GL_TEXTURE28 0x84DC
15221+#define GL_TEXTURE29 0x84DD
15222+#define GL_TEXTURE30 0x84DE
15223+#define GL_TEXTURE31 0x84DF
15224+#define GL_ACTIVE_TEXTURE 0x84E0
15225+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
15226+#define GL_MAX_TEXTURE_UNITS 0x84E2
15227+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
15228+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
15229+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
15230+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
15231+#define GL_MULTISAMPLE 0x809D
15232+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
15233+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
15234+#define GL_SAMPLE_COVERAGE 0x80A0
15235+#define GL_SAMPLE_BUFFERS 0x80A8
15236+#define GL_SAMPLES 0x80A9
15237+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
15238+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
15239+#define GL_MULTISAMPLE_BIT 0x20000000
15240+#define GL_NORMAL_MAP 0x8511
15241+#define GL_REFLECTION_MAP 0x8512
15242+#define GL_TEXTURE_CUBE_MAP 0x8513
15243+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
15244+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
15245+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
15246+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
15247+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
15248+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
15249+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
15250+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
15251+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
15252+#define GL_COMPRESSED_ALPHA 0x84E9
15253+#define GL_COMPRESSED_LUMINANCE 0x84EA
15254+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
15255+#define GL_COMPRESSED_INTENSITY 0x84EC
15256+#define GL_COMPRESSED_RGB 0x84ED
15257+#define GL_COMPRESSED_RGBA 0x84EE
15258+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
15259+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
15260+#define GL_TEXTURE_COMPRESSED 0x86A1
15261+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
15262+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
15263+#define GL_CLAMP_TO_BORDER 0x812D
15264+#define GL_COMBINE 0x8570
15265+#define GL_COMBINE_RGB 0x8571
15266+#define GL_COMBINE_ALPHA 0x8572
15267+#define GL_SOURCE0_RGB 0x8580
15268+#define GL_SOURCE1_RGB 0x8581
15269+#define GL_SOURCE2_RGB 0x8582
15270+#define GL_SOURCE0_ALPHA 0x8588
15271+#define GL_SOURCE1_ALPHA 0x8589
15272+#define GL_SOURCE2_ALPHA 0x858A
15273+#define GL_OPERAND0_RGB 0x8590
15274+#define GL_OPERAND1_RGB 0x8591
15275+#define GL_OPERAND2_RGB 0x8592
15276+#define GL_OPERAND0_ALPHA 0x8598
15277+#define GL_OPERAND1_ALPHA 0x8599
15278+#define GL_OPERAND2_ALPHA 0x859A
15279+#define GL_RGB_SCALE 0x8573
15280+#define GL_ADD_SIGNED 0x8574
15281+#define GL_INTERPOLATE 0x8575
15282+#define GL_SUBTRACT 0x84E7
15283+#define GL_CONSTANT 0x8576
15284+#define GL_PRIMARY_COLOR 0x8577
15285+#define GL_PREVIOUS 0x8578
15286+#define GL_DOT3_RGB 0x86AE
15287+#define GL_DOT3_RGBA 0x86AF
15288+#endif
15289+
15290+#ifndef GL_VERSION_1_4
15291+#define GL_BLEND_DST_RGB 0x80C8
15292+#define GL_BLEND_SRC_RGB 0x80C9
15293+#define GL_BLEND_DST_ALPHA 0x80CA
15294+#define GL_BLEND_SRC_ALPHA 0x80CB
15295+#define GL_POINT_SIZE_MIN 0x8126
15296+#define GL_POINT_SIZE_MAX 0x8127
15297+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
15298+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
15299+#define GL_GENERATE_MIPMAP 0x8191
15300+#define GL_GENERATE_MIPMAP_HINT 0x8192
15301+#define GL_DEPTH_COMPONENT16 0x81A5
15302+#define GL_DEPTH_COMPONENT24 0x81A6
15303+#define GL_DEPTH_COMPONENT32 0x81A7
15304+#define GL_MIRRORED_REPEAT 0x8370
15305+#define GL_FOG_COORDINATE_SOURCE 0x8450
15306+#define GL_FOG_COORDINATE 0x8451
15307+#define GL_FRAGMENT_DEPTH 0x8452
15308+#define GL_CURRENT_FOG_COORDINATE 0x8453
15309+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
15310+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
15311+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
15312+#define GL_FOG_COORDINATE_ARRAY 0x8457
15313+#define GL_COLOR_SUM 0x8458
15314+#define GL_CURRENT_SECONDARY_COLOR 0x8459
15315+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
15316+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
15317+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
15318+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
15319+#define GL_SECONDARY_COLOR_ARRAY 0x845E
15320+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
15321+#define GL_TEXTURE_FILTER_CONTROL 0x8500
15322+#define GL_TEXTURE_LOD_BIAS 0x8501
15323+#define GL_INCR_WRAP 0x8507
15324+#define GL_DECR_WRAP 0x8508
15325+#define GL_TEXTURE_DEPTH_SIZE 0x884A
15326+#define GL_DEPTH_TEXTURE_MODE 0x884B
15327+#define GL_TEXTURE_COMPARE_MODE 0x884C
15328+#define GL_TEXTURE_COMPARE_FUNC 0x884D
15329+#define GL_COMPARE_R_TO_TEXTURE 0x884E
15330+#endif
15331+
15332+#ifndef GL_VERSION_1_5
15333+#define GL_BUFFER_SIZE 0x8764
15334+#define GL_BUFFER_USAGE 0x8765
15335+#define GL_QUERY_COUNTER_BITS 0x8864
15336+#define GL_CURRENT_QUERY 0x8865
15337+#define GL_QUERY_RESULT 0x8866
15338+#define GL_QUERY_RESULT_AVAILABLE 0x8867
15339+#define GL_ARRAY_BUFFER 0x8892
15340+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
15341+#define GL_ARRAY_BUFFER_BINDING 0x8894
15342+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
15343+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
15344+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
15345+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
15346+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
15347+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
15348+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
15349+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
15350+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
15351+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
15352+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
15353+#define GL_READ_ONLY 0x88B8
15354+#define GL_WRITE_ONLY 0x88B9
15355+#define GL_READ_WRITE 0x88BA
15356+#define GL_BUFFER_ACCESS 0x88BB
15357+#define GL_BUFFER_MAPPED 0x88BC
15358+#define GL_BUFFER_MAP_POINTER 0x88BD
15359+#define GL_STREAM_DRAW 0x88E0
15360+#define GL_STREAM_READ 0x88E1
15361+#define GL_STREAM_COPY 0x88E2
15362+#define GL_STATIC_DRAW 0x88E4
15363+#define GL_STATIC_READ 0x88E5
15364+#define GL_STATIC_COPY 0x88E6
15365+#define GL_DYNAMIC_DRAW 0x88E8
15366+#define GL_DYNAMIC_READ 0x88E9
15367+#define GL_DYNAMIC_COPY 0x88EA
15368+#define GL_SAMPLES_PASSED 0x8914
15369+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
15370+#define GL_FOG_COORD GL_FOG_COORDINATE
15371+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
15372+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
15373+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
15374+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
15375+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
15376+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
15377+#define GL_SRC0_RGB GL_SOURCE0_RGB
15378+#define GL_SRC1_RGB GL_SOURCE1_RGB
15379+#define GL_SRC2_RGB GL_SOURCE2_RGB
15380+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
15381+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
15382+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
15383+#endif
15384+
15385+#ifndef GL_VERSION_2_0
15386+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
15387+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
15388+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
15389+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
15390+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
15391+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
15392+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
15393+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
15394+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
15395+#define GL_STENCIL_BACK_FUNC 0x8800
15396+#define GL_STENCIL_BACK_FAIL 0x8801
15397+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
15398+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
15399+#define GL_MAX_DRAW_BUFFERS 0x8824
15400+#define GL_DRAW_BUFFER0 0x8825
15401+#define GL_DRAW_BUFFER1 0x8826
15402+#define GL_DRAW_BUFFER2 0x8827
15403+#define GL_DRAW_BUFFER3 0x8828
15404+#define GL_DRAW_BUFFER4 0x8829
15405+#define GL_DRAW_BUFFER5 0x882A
15406+#define GL_DRAW_BUFFER6 0x882B
15407+#define GL_DRAW_BUFFER7 0x882C
15408+#define GL_DRAW_BUFFER8 0x882D
15409+#define GL_DRAW_BUFFER9 0x882E
15410+#define GL_DRAW_BUFFER10 0x882F
15411+#define GL_DRAW_BUFFER11 0x8830
15412+#define GL_DRAW_BUFFER12 0x8831
15413+#define GL_DRAW_BUFFER13 0x8832
15414+#define GL_DRAW_BUFFER14 0x8833
15415+#define GL_DRAW_BUFFER15 0x8834
15416+#define GL_BLEND_EQUATION_ALPHA 0x883D
15417+#define GL_POINT_SPRITE 0x8861
15418+#define GL_COORD_REPLACE 0x8862
15419+#define GL_MAX_VERTEX_ATTRIBS 0x8869
15420+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
15421+#define GL_MAX_TEXTURE_COORDS 0x8871
15422+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
15423+#define GL_FRAGMENT_SHADER 0x8B30
15424+#define GL_VERTEX_SHADER 0x8B31
15425+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
15426+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
15427+#define GL_MAX_VARYING_FLOATS 0x8B4B
15428+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
15429+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
15430+#define GL_SHADER_TYPE 0x8B4F
15431+#define GL_FLOAT_VEC2 0x8B50
15432+#define GL_FLOAT_VEC3 0x8B51
15433+#define GL_FLOAT_VEC4 0x8B52
15434+#define GL_INT_VEC2 0x8B53
15435+#define GL_INT_VEC3 0x8B54
15436+#define GL_INT_VEC4 0x8B55
15437+#define GL_BOOL 0x8B56
15438+#define GL_BOOL_VEC2 0x8B57
15439+#define GL_BOOL_VEC3 0x8B58
15440+#define GL_BOOL_VEC4 0x8B59
15441+#define GL_FLOAT_MAT2 0x8B5A
15442+#define GL_FLOAT_MAT3 0x8B5B
15443+#define GL_FLOAT_MAT4 0x8B5C
15444+#define GL_SAMPLER_1D 0x8B5D
15445+#define GL_SAMPLER_2D 0x8B5E
15446+#define GL_SAMPLER_3D 0x8B5F
15447+#define GL_SAMPLER_CUBE 0x8B60
15448+#define GL_SAMPLER_1D_SHADOW 0x8B61
15449+#define GL_SAMPLER_2D_SHADOW 0x8B62
15450+#define GL_DELETE_STATUS 0x8B80
15451+#define GL_COMPILE_STATUS 0x8B81
15452+#define GL_LINK_STATUS 0x8B82
15453+#define GL_VALIDATE_STATUS 0x8B83
15454+#define GL_INFO_LOG_LENGTH 0x8B84
15455+#define GL_ATTACHED_SHADERS 0x8B85
15456+#define GL_ACTIVE_UNIFORMS 0x8B86
15457+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
15458+#define GL_SHADER_SOURCE_LENGTH 0x8B88
15459+#define GL_ACTIVE_ATTRIBUTES 0x8B89
15460+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
15461+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
15462+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
15463+#define GL_CURRENT_PROGRAM 0x8B8D
15464+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
15465+#define GL_LOWER_LEFT 0x8CA1
15466+#define GL_UPPER_LEFT 0x8CA2
15467+#define GL_STENCIL_BACK_REF 0x8CA3
15468+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
15469+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
15470+#endif
15471+
15472+#ifndef GL_VERSION_2_1
15473+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
15474+#define GL_PIXEL_PACK_BUFFER 0x88EB
15475+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
15476+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
15477+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
15478+#define GL_FLOAT_MAT2x3 0x8B65
15479+#define GL_FLOAT_MAT2x4 0x8B66
15480+#define GL_FLOAT_MAT3x2 0x8B67
15481+#define GL_FLOAT_MAT3x4 0x8B68
15482+#define GL_FLOAT_MAT4x2 0x8B69
15483+#define GL_FLOAT_MAT4x3 0x8B6A
15484+#define GL_SRGB 0x8C40
15485+#define GL_SRGB8 0x8C41
15486+#define GL_SRGB_ALPHA 0x8C42
15487+#define GL_SRGB8_ALPHA8 0x8C43
15488+#define GL_SLUMINANCE_ALPHA 0x8C44
15489+#define GL_SLUMINANCE8_ALPHA8 0x8C45
15490+#define GL_SLUMINANCE 0x8C46
15491+#define GL_SLUMINANCE8 0x8C47
15492+#define GL_COMPRESSED_SRGB 0x8C48
15493+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
15494+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
15495+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
15496+#endif
15497+
15498+#ifndef GL_ARB_multitexture
15499+#define GL_TEXTURE0_ARB 0x84C0
15500+#define GL_TEXTURE1_ARB 0x84C1
15501+#define GL_TEXTURE2_ARB 0x84C2
15502+#define GL_TEXTURE3_ARB 0x84C3
15503+#define GL_TEXTURE4_ARB 0x84C4
15504+#define GL_TEXTURE5_ARB 0x84C5
15505+#define GL_TEXTURE6_ARB 0x84C6
15506+#define GL_TEXTURE7_ARB 0x84C7
15507+#define GL_TEXTURE8_ARB 0x84C8
15508+#define GL_TEXTURE9_ARB 0x84C9
15509+#define GL_TEXTURE10_ARB 0x84CA
15510+#define GL_TEXTURE11_ARB 0x84CB
15511+#define GL_TEXTURE12_ARB 0x84CC
15512+#define GL_TEXTURE13_ARB 0x84CD
15513+#define GL_TEXTURE14_ARB 0x84CE
15514+#define GL_TEXTURE15_ARB 0x84CF
15515+#define GL_TEXTURE16_ARB 0x84D0
15516+#define GL_TEXTURE17_ARB 0x84D1
15517+#define GL_TEXTURE18_ARB 0x84D2
15518+#define GL_TEXTURE19_ARB 0x84D3
15519+#define GL_TEXTURE20_ARB 0x84D4
15520+#define GL_TEXTURE21_ARB 0x84D5
15521+#define GL_TEXTURE22_ARB 0x84D6
15522+#define GL_TEXTURE23_ARB 0x84D7
15523+#define GL_TEXTURE24_ARB 0x84D8
15524+#define GL_TEXTURE25_ARB 0x84D9
15525+#define GL_TEXTURE26_ARB 0x84DA
15526+#define GL_TEXTURE27_ARB 0x84DB
15527+#define GL_TEXTURE28_ARB 0x84DC
15528+#define GL_TEXTURE29_ARB 0x84DD
15529+#define GL_TEXTURE30_ARB 0x84DE
15530+#define GL_TEXTURE31_ARB 0x84DF
15531+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
15532+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
15533+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
15534+#endif
15535+
15536+#ifndef GL_ARB_transpose_matrix
15537+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
15538+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
15539+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
15540+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
15541+#endif
15542+
15543+#ifndef GL_ARB_multisample
15544+#define GL_MULTISAMPLE_ARB 0x809D
15545+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
15546+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
15547+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
15548+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
15549+#define GL_SAMPLES_ARB 0x80A9
15550+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
15551+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
15552+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
15553+#endif
15554+
15555+#ifndef GL_ARB_texture_env_add
15556+#endif
15557+
15558+#ifndef GL_ARB_texture_cube_map
15559+#define GL_NORMAL_MAP_ARB 0x8511
15560+#define GL_REFLECTION_MAP_ARB 0x8512
15561+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
15562+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
15563+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
15564+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
15565+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
15566+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
15567+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
15568+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
15569+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
15570+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
15571+#endif
15572+
15573+#ifndef GL_ARB_texture_compression
15574+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
15575+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
15576+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
15577+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
15578+#define GL_COMPRESSED_RGB_ARB 0x84ED
15579+#define GL_COMPRESSED_RGBA_ARB 0x84EE
15580+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
15581+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
15582+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
15583+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
15584+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
15585+#endif
15586+
15587+#ifndef GL_ARB_texture_border_clamp
15588+#define GL_CLAMP_TO_BORDER_ARB 0x812D
15589+#endif
15590+
15591+#ifndef GL_ARB_point_parameters
15592+#define GL_POINT_SIZE_MIN_ARB 0x8126
15593+#define GL_POINT_SIZE_MAX_ARB 0x8127
15594+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
15595+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
15596+#endif
15597+
15598+#ifndef GL_ARB_vertex_blend
15599+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
15600+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
15601+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
15602+#define GL_VERTEX_BLEND_ARB 0x86A7
15603+#define GL_CURRENT_WEIGHT_ARB 0x86A8
15604+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
15605+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
15606+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
15607+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
15608+#define GL_WEIGHT_ARRAY_ARB 0x86AD
15609+#define GL_MODELVIEW0_ARB 0x1700
15610+#define GL_MODELVIEW1_ARB 0x850A
15611+#define GL_MODELVIEW2_ARB 0x8722
15612+#define GL_MODELVIEW3_ARB 0x8723
15613+#define GL_MODELVIEW4_ARB 0x8724
15614+#define GL_MODELVIEW5_ARB 0x8725
15615+#define GL_MODELVIEW6_ARB 0x8726
15616+#define GL_MODELVIEW7_ARB 0x8727
15617+#define GL_MODELVIEW8_ARB 0x8728
15618+#define GL_MODELVIEW9_ARB 0x8729
15619+#define GL_MODELVIEW10_ARB 0x872A
15620+#define GL_MODELVIEW11_ARB 0x872B
15621+#define GL_MODELVIEW12_ARB 0x872C
15622+#define GL_MODELVIEW13_ARB 0x872D
15623+#define GL_MODELVIEW14_ARB 0x872E
15624+#define GL_MODELVIEW15_ARB 0x872F
15625+#define GL_MODELVIEW16_ARB 0x8730
15626+#define GL_MODELVIEW17_ARB 0x8731
15627+#define GL_MODELVIEW18_ARB 0x8732
15628+#define GL_MODELVIEW19_ARB 0x8733
15629+#define GL_MODELVIEW20_ARB 0x8734
15630+#define GL_MODELVIEW21_ARB 0x8735
15631+#define GL_MODELVIEW22_ARB 0x8736
15632+#define GL_MODELVIEW23_ARB 0x8737
15633+#define GL_MODELVIEW24_ARB 0x8738
15634+#define GL_MODELVIEW25_ARB 0x8739
15635+#define GL_MODELVIEW26_ARB 0x873A
15636+#define GL_MODELVIEW27_ARB 0x873B
15637+#define GL_MODELVIEW28_ARB 0x873C
15638+#define GL_MODELVIEW29_ARB 0x873D
15639+#define GL_MODELVIEW30_ARB 0x873E
15640+#define GL_MODELVIEW31_ARB 0x873F
15641+#endif
15642+
15643+#ifndef GL_ARB_matrix_palette
15644+#define GL_MATRIX_PALETTE_ARB 0x8840
15645+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
15646+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
15647+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
15648+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
15649+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
15650+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
15651+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
15652+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
15653+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
15654+#endif
15655+
15656+#ifndef GL_ARB_texture_env_combine
15657+#define GL_COMBINE_ARB 0x8570
15658+#define GL_COMBINE_RGB_ARB 0x8571
15659+#define GL_COMBINE_ALPHA_ARB 0x8572
15660+#define GL_SOURCE0_RGB_ARB 0x8580
15661+#define GL_SOURCE1_RGB_ARB 0x8581
15662+#define GL_SOURCE2_RGB_ARB 0x8582
15663+#define GL_SOURCE0_ALPHA_ARB 0x8588
15664+#define GL_SOURCE1_ALPHA_ARB 0x8589
15665+#define GL_SOURCE2_ALPHA_ARB 0x858A
15666+#define GL_OPERAND0_RGB_ARB 0x8590
15667+#define GL_OPERAND1_RGB_ARB 0x8591
15668+#define GL_OPERAND2_RGB_ARB 0x8592
15669+#define GL_OPERAND0_ALPHA_ARB 0x8598
15670+#define GL_OPERAND1_ALPHA_ARB 0x8599
15671+#define GL_OPERAND2_ALPHA_ARB 0x859A
15672+#define GL_RGB_SCALE_ARB 0x8573
15673+#define GL_ADD_SIGNED_ARB 0x8574
15674+#define GL_INTERPOLATE_ARB 0x8575
15675+#define GL_SUBTRACT_ARB 0x84E7
15676+#define GL_CONSTANT_ARB 0x8576
15677+#define GL_PRIMARY_COLOR_ARB 0x8577
15678+#define GL_PREVIOUS_ARB 0x8578
15679+#endif
15680+
15681+#ifndef GL_ARB_texture_env_crossbar
15682+#endif
15683+
15684+#ifndef GL_ARB_texture_env_dot3
15685+#define GL_DOT3_RGB_ARB 0x86AE
15686+#define GL_DOT3_RGBA_ARB 0x86AF
15687+#endif
15688+
15689+#ifndef GL_ARB_texture_mirrored_repeat
15690+#define GL_MIRRORED_REPEAT_ARB 0x8370
15691+#endif
15692+
15693+#ifndef GL_ARB_depth_texture
15694+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
15695+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
15696+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
15697+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
15698+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
15699+#endif
15700+
15701+#ifndef GL_ARB_shadow
15702+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
15703+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
15704+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
15705+#endif
15706+
15707+#ifndef GL_ARB_shadow_ambient
15708+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
15709+#endif
15710+
15711+#ifndef GL_ARB_window_pos
15712+#endif
15713+
15714+#ifndef GL_ARB_vertex_program
15715+#define GL_COLOR_SUM_ARB 0x8458
15716+#define GL_VERTEX_PROGRAM_ARB 0x8620
15717+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
15718+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
15719+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
15720+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
15721+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
15722+#define GL_PROGRAM_LENGTH_ARB 0x8627
15723+#define GL_PROGRAM_STRING_ARB 0x8628
15724+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
15725+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
15726+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
15727+#define GL_CURRENT_MATRIX_ARB 0x8641
15728+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
15729+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
15730+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
15731+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
15732+#define GL_PROGRAM_BINDING_ARB 0x8677
15733+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
15734+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
15735+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
15736+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
15737+#define GL_PROGRAM_FORMAT_ARB 0x8876
15738+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
15739+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
15740+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
15741+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
15742+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
15743+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
15744+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
15745+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
15746+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
15747+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
15748+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
15749+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
15750+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
15751+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
15752+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
15753+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
15754+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
15755+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
15756+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
15757+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
15758+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
15759+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
15760+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
15761+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
15762+#define GL_MATRIX0_ARB 0x88C0
15763+#define GL_MATRIX1_ARB 0x88C1
15764+#define GL_MATRIX2_ARB 0x88C2
15765+#define GL_MATRIX3_ARB 0x88C3
15766+#define GL_MATRIX4_ARB 0x88C4
15767+#define GL_MATRIX5_ARB 0x88C5
15768+#define GL_MATRIX6_ARB 0x88C6
15769+#define GL_MATRIX7_ARB 0x88C7
15770+#define GL_MATRIX8_ARB 0x88C8
15771+#define GL_MATRIX9_ARB 0x88C9
15772+#define GL_MATRIX10_ARB 0x88CA
15773+#define GL_MATRIX11_ARB 0x88CB
15774+#define GL_MATRIX12_ARB 0x88CC
15775+#define GL_MATRIX13_ARB 0x88CD
15776+#define GL_MATRIX14_ARB 0x88CE
15777+#define GL_MATRIX15_ARB 0x88CF
15778+#define GL_MATRIX16_ARB 0x88D0
15779+#define GL_MATRIX17_ARB 0x88D1
15780+#define GL_MATRIX18_ARB 0x88D2
15781+#define GL_MATRIX19_ARB 0x88D3
15782+#define GL_MATRIX20_ARB 0x88D4
15783+#define GL_MATRIX21_ARB 0x88D5
15784+#define GL_MATRIX22_ARB 0x88D6
15785+#define GL_MATRIX23_ARB 0x88D7
15786+#define GL_MATRIX24_ARB 0x88D8
15787+#define GL_MATRIX25_ARB 0x88D9
15788+#define GL_MATRIX26_ARB 0x88DA
15789+#define GL_MATRIX27_ARB 0x88DB
15790+#define GL_MATRIX28_ARB 0x88DC
15791+#define GL_MATRIX29_ARB 0x88DD
15792+#define GL_MATRIX30_ARB 0x88DE
15793+#define GL_MATRIX31_ARB 0x88DF
15794+#endif
15795+
15796+#ifndef GL_ARB_fragment_program
15797+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
15798+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
15799+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
15800+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
15801+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
15802+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
15803+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
15804+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
15805+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
15806+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
15807+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
15808+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
15809+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
15810+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
15811+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
15812+#endif
15813+
15814+#ifndef GL_ARB_vertex_buffer_object
15815+#define GL_BUFFER_SIZE_ARB 0x8764
15816+#define GL_BUFFER_USAGE_ARB 0x8765
15817+#define GL_ARRAY_BUFFER_ARB 0x8892
15818+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
15819+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
15820+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
15821+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
15822+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
15823+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
15824+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
15825+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
15826+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
15827+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
15828+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
15829+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
15830+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
15831+#define GL_READ_ONLY_ARB 0x88B8
15832+#define GL_WRITE_ONLY_ARB 0x88B9
15833+#define GL_READ_WRITE_ARB 0x88BA
15834+#define GL_BUFFER_ACCESS_ARB 0x88BB
15835+#define GL_BUFFER_MAPPED_ARB 0x88BC
15836+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
15837+#define GL_STREAM_DRAW_ARB 0x88E0
15838+#define GL_STREAM_READ_ARB 0x88E1
15839+#define GL_STREAM_COPY_ARB 0x88E2
15840+#define GL_STATIC_DRAW_ARB 0x88E4
15841+#define GL_STATIC_READ_ARB 0x88E5
15842+#define GL_STATIC_COPY_ARB 0x88E6
15843+#define GL_DYNAMIC_DRAW_ARB 0x88E8
15844+#define GL_DYNAMIC_READ_ARB 0x88E9
15845+#define GL_DYNAMIC_COPY_ARB 0x88EA
15846+#endif
15847+
15848+#ifndef GL_ARB_occlusion_query
15849+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
15850+#define GL_CURRENT_QUERY_ARB 0x8865
15851+#define GL_QUERY_RESULT_ARB 0x8866
15852+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
15853+#define GL_SAMPLES_PASSED_ARB 0x8914
15854+#endif
15855+
15856+#ifndef GL_ARB_shader_objects
15857+#define GL_PROGRAM_OBJECT_ARB 0x8B40
15858+#define GL_SHADER_OBJECT_ARB 0x8B48
15859+#define GL_OBJECT_TYPE_ARB 0x8B4E
15860+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
15861+#define GL_FLOAT_VEC2_ARB 0x8B50
15862+#define GL_FLOAT_VEC3_ARB 0x8B51
15863+#define GL_FLOAT_VEC4_ARB 0x8B52
15864+#define GL_INT_VEC2_ARB 0x8B53
15865+#define GL_INT_VEC3_ARB 0x8B54
15866+#define GL_INT_VEC4_ARB 0x8B55
15867+#define GL_BOOL_ARB 0x8B56
15868+#define GL_BOOL_VEC2_ARB 0x8B57
15869+#define GL_BOOL_VEC3_ARB 0x8B58
15870+#define GL_BOOL_VEC4_ARB 0x8B59
15871+#define GL_FLOAT_MAT2_ARB 0x8B5A
15872+#define GL_FLOAT_MAT3_ARB 0x8B5B
15873+#define GL_FLOAT_MAT4_ARB 0x8B5C
15874+#define GL_SAMPLER_1D_ARB 0x8B5D
15875+#define GL_SAMPLER_2D_ARB 0x8B5E
15876+#define GL_SAMPLER_3D_ARB 0x8B5F
15877+#define GL_SAMPLER_CUBE_ARB 0x8B60
15878+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
15879+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
15880+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
15881+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
15882+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
15883+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
15884+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
15885+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
15886+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
15887+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
15888+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
15889+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
15890+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
15891+#endif
15892+
15893+#ifndef GL_ARB_vertex_shader
15894+#define GL_VERTEX_SHADER_ARB 0x8B31
15895+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
15896+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
15897+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
15898+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
15899+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
15900+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
15901+#endif
15902+
15903+#ifndef GL_ARB_fragment_shader
15904+#define GL_FRAGMENT_SHADER_ARB 0x8B30
15905+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
15906+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
15907+#endif
15908+
15909+#ifndef GL_ARB_shading_language_100
15910+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
15911+#endif
15912+
15913+#ifndef GL_ARB_texture_non_power_of_two
15914+#endif
15915+
15916+#ifndef GL_ARB_point_sprite
15917+#define GL_POINT_SPRITE_ARB 0x8861
15918+#define GL_COORD_REPLACE_ARB 0x8862
15919+#endif
15920+
15921+#ifndef GL_ARB_fragment_program_shadow
15922+#endif
15923+
15924+#ifndef GL_ARB_draw_buffers
15925+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
15926+#define GL_DRAW_BUFFER0_ARB 0x8825
15927+#define GL_DRAW_BUFFER1_ARB 0x8826
15928+#define GL_DRAW_BUFFER2_ARB 0x8827
15929+#define GL_DRAW_BUFFER3_ARB 0x8828
15930+#define GL_DRAW_BUFFER4_ARB 0x8829
15931+#define GL_DRAW_BUFFER5_ARB 0x882A
15932+#define GL_DRAW_BUFFER6_ARB 0x882B
15933+#define GL_DRAW_BUFFER7_ARB 0x882C
15934+#define GL_DRAW_BUFFER8_ARB 0x882D
15935+#define GL_DRAW_BUFFER9_ARB 0x882E
15936+#define GL_DRAW_BUFFER10_ARB 0x882F
15937+#define GL_DRAW_BUFFER11_ARB 0x8830
15938+#define GL_DRAW_BUFFER12_ARB 0x8831
15939+#define GL_DRAW_BUFFER13_ARB 0x8832
15940+#define GL_DRAW_BUFFER14_ARB 0x8833
15941+#define GL_DRAW_BUFFER15_ARB 0x8834
15942+#endif
15943+
15944+#ifndef GL_ARB_texture_rectangle
15945+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
15946+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
15947+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
15948+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
15949+#endif
15950+
15951+#ifndef GL_ARB_color_buffer_float
15952+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
15953+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
15954+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
15955+#define GL_CLAMP_READ_COLOR_ARB 0x891C
15956+#define GL_FIXED_ONLY_ARB 0x891D
15957+#endif
15958+
15959+#ifndef GL_ARB_half_float_pixel
15960+#define GL_HALF_FLOAT_ARB 0x140B
15961+#endif
15962+
15963+#ifndef GL_ARB_texture_float
15964+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
15965+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
15966+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
15967+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
15968+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
15969+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
15970+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
15971+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
15972+#define GL_RGBA32F_ARB 0x8814
15973+#define GL_RGB32F_ARB 0x8815
15974+#define GL_ALPHA32F_ARB 0x8816
15975+#define GL_INTENSITY32F_ARB 0x8817
15976+#define GL_LUMINANCE32F_ARB 0x8818
15977+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
15978+#define GL_RGBA16F_ARB 0x881A
15979+#define GL_RGB16F_ARB 0x881B
15980+#define GL_ALPHA16F_ARB 0x881C
15981+#define GL_INTENSITY16F_ARB 0x881D
15982+#define GL_LUMINANCE16F_ARB 0x881E
15983+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
15984+#endif
15985+
15986+#ifndef GL_ARB_pixel_buffer_object
15987+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
15988+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
15989+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
15990+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
15991+#endif
15992+
15993+#ifndef GL_EXT_abgr
15994+#define GL_ABGR_EXT 0x8000
15995+#endif
15996+
15997+#ifndef GL_EXT_blend_color
15998+#define GL_CONSTANT_COLOR_EXT 0x8001
15999+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
16000+#define GL_CONSTANT_ALPHA_EXT 0x8003
16001+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
16002+#define GL_BLEND_COLOR_EXT 0x8005
16003+#endif
16004+
16005+#ifndef GL_EXT_polygon_offset
16006+#define GL_POLYGON_OFFSET_EXT 0x8037
16007+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
16008+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
16009+#endif
16010+
16011+#ifndef GL_EXT_texture
16012+#define GL_ALPHA4_EXT 0x803B
16013+#define GL_ALPHA8_EXT 0x803C
16014+#define GL_ALPHA12_EXT 0x803D
16015+#define GL_ALPHA16_EXT 0x803E
16016+#define GL_LUMINANCE4_EXT 0x803F
16017+#define GL_LUMINANCE8_EXT 0x8040
16018+#define GL_LUMINANCE12_EXT 0x8041
16019+#define GL_LUMINANCE16_EXT 0x8042
16020+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
16021+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
16022+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
16023+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
16024+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
16025+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
16026+#define GL_INTENSITY_EXT 0x8049
16027+#define GL_INTENSITY4_EXT 0x804A
16028+#define GL_INTENSITY8_EXT 0x804B
16029+#define GL_INTENSITY12_EXT 0x804C
16030+#define GL_INTENSITY16_EXT 0x804D
16031+#define GL_RGB2_EXT 0x804E
16032+#define GL_RGB4_EXT 0x804F
16033+#define GL_RGB5_EXT 0x8050
16034+#define GL_RGB8_EXT 0x8051
16035+#define GL_RGB10_EXT 0x8052
16036+#define GL_RGB12_EXT 0x8053
16037+#define GL_RGB16_EXT 0x8054
16038+#define GL_RGBA2_EXT 0x8055
16039+#define GL_RGBA4_EXT 0x8056
16040+#define GL_RGB5_A1_EXT 0x8057
16041+#define GL_RGBA8_EXT 0x8058
16042+#define GL_RGB10_A2_EXT 0x8059
16043+#define GL_RGBA12_EXT 0x805A
16044+#define GL_RGBA16_EXT 0x805B
16045+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
16046+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
16047+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
16048+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
16049+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
16050+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
16051+#define GL_REPLACE_EXT 0x8062
16052+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
16053+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
16054+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
16055+#endif
16056+
16057+#ifndef GL_EXT_texture3D
16058+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
16059+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
16060+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
16061+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
16062+#define GL_TEXTURE_3D_EXT 0x806F
16063+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
16064+#define GL_TEXTURE_DEPTH_EXT 0x8071
16065+#define GL_TEXTURE_WRAP_R_EXT 0x8072
16066+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
16067+#endif
16068+
16069+#ifndef GL_SGIS_texture_filter4
16070+#define GL_FILTER4_SGIS 0x8146
16071+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
16072+#endif
16073+
16074+#ifndef GL_EXT_subtexture
16075+#endif
16076+
16077+#ifndef GL_EXT_copy_texture
16078+#endif
16079+
16080+#ifndef GL_EXT_histogram
16081+#define GL_HISTOGRAM_EXT 0x8024
16082+#define GL_PROXY_HISTOGRAM_EXT 0x8025
16083+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
16084+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
16085+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
16086+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
16087+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
16088+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
16089+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
16090+#define GL_HISTOGRAM_SINK_EXT 0x802D
16091+#define GL_MINMAX_EXT 0x802E
16092+#define GL_MINMAX_FORMAT_EXT 0x802F
16093+#define GL_MINMAX_SINK_EXT 0x8030
16094+#define GL_TABLE_TOO_LARGE_EXT 0x8031
16095+#endif
16096+
16097+#ifndef GL_EXT_convolution
16098+#define GL_CONVOLUTION_1D_EXT 0x8010
16099+#define GL_CONVOLUTION_2D_EXT 0x8011
16100+#define GL_SEPARABLE_2D_EXT 0x8012
16101+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
16102+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
16103+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
16104+#define GL_REDUCE_EXT 0x8016
16105+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
16106+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
16107+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
16108+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
16109+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
16110+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
16111+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
16112+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
16113+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
16114+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
16115+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
16116+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
16117+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
16118+#endif
16119+
16120+#ifndef GL_SGI_color_matrix
16121+#define GL_COLOR_MATRIX_SGI 0x80B1
16122+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
16123+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
16124+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
16125+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
16126+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
16127+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
16128+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
16129+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
16130+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
16131+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
16132+#endif
16133+
16134+#ifndef GL_SGI_color_table
16135+#define GL_COLOR_TABLE_SGI 0x80D0
16136+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
16137+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
16138+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
16139+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
16140+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
16141+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
16142+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
16143+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
16144+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
16145+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
16146+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
16147+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
16148+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
16149+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
16150+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
16151+#endif
16152+
16153+#ifndef GL_SGIS_pixel_texture
16154+#define GL_PIXEL_TEXTURE_SGIS 0x8353
16155+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
16156+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
16157+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
16158+#endif
16159+
16160+#ifndef GL_SGIX_pixel_texture
16161+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
16162+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
16163+#endif
16164+
16165+#ifndef GL_SGIS_texture4D
16166+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
16167+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
16168+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
16169+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
16170+#define GL_TEXTURE_4D_SGIS 0x8134
16171+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
16172+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
16173+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
16174+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
16175+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
16176+#endif
16177+
16178+#ifndef GL_SGI_texture_color_table
16179+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
16180+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
16181+#endif
16182+
16183+#ifndef GL_EXT_cmyka
16184+#define GL_CMYK_EXT 0x800C
16185+#define GL_CMYKA_EXT 0x800D
16186+#define GL_PACK_CMYK_HINT_EXT 0x800E
16187+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
16188+#endif
16189+
16190+#ifndef GL_EXT_texture_object
16191+#define GL_TEXTURE_PRIORITY_EXT 0x8066
16192+#define GL_TEXTURE_RESIDENT_EXT 0x8067
16193+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
16194+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
16195+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
16196+#endif
16197+
16198+#ifndef GL_SGIS_detail_texture
16199+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
16200+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
16201+#define GL_LINEAR_DETAIL_SGIS 0x8097
16202+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
16203+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
16204+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
16205+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
16206+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
16207+#endif
16208+
16209+#ifndef GL_SGIS_sharpen_texture
16210+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
16211+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
16212+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
16213+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
16214+#endif
16215+
16216+#ifndef GL_EXT_packed_pixels
16217+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
16218+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
16219+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
16220+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
16221+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
16222+#endif
16223+
16224+#ifndef GL_SGIS_texture_lod
16225+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
16226+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
16227+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
16228+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
16229+#endif
16230+
16231+#ifndef GL_SGIS_multisample
16232+#define GL_MULTISAMPLE_SGIS 0x809D
16233+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
16234+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
16235+#define GL_SAMPLE_MASK_SGIS 0x80A0
16236+#define GL_1PASS_SGIS 0x80A1
16237+#define GL_2PASS_0_SGIS 0x80A2
16238+#define GL_2PASS_1_SGIS 0x80A3
16239+#define GL_4PASS_0_SGIS 0x80A4
16240+#define GL_4PASS_1_SGIS 0x80A5
16241+#define GL_4PASS_2_SGIS 0x80A6
16242+#define GL_4PASS_3_SGIS 0x80A7
16243+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
16244+#define GL_SAMPLES_SGIS 0x80A9
16245+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
16246+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
16247+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
16248+#endif
16249+
16250+#ifndef GL_EXT_rescale_normal
16251+#define GL_RESCALE_NORMAL_EXT 0x803A
16252+#endif
16253+
16254+#ifndef GL_EXT_vertex_array
16255+#define GL_VERTEX_ARRAY_EXT 0x8074
16256+#define GL_NORMAL_ARRAY_EXT 0x8075
16257+#define GL_COLOR_ARRAY_EXT 0x8076
16258+#define GL_INDEX_ARRAY_EXT 0x8077
16259+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
16260+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
16261+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
16262+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
16263+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
16264+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
16265+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
16266+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
16267+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
16268+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
16269+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
16270+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
16271+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
16272+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
16273+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
16274+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
16275+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
16276+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
16277+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
16278+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
16279+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
16280+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
16281+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
16282+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
16283+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
16284+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
16285+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
16286+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
16287+#endif
16288+
16289+#ifndef GL_EXT_misc_attribute
16290+#endif
16291+
16292+#ifndef GL_SGIS_generate_mipmap
16293+#define GL_GENERATE_MIPMAP_SGIS 0x8191
16294+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
16295+#endif
16296+
16297+#ifndef GL_SGIX_clipmap
16298+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
16299+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
16300+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
16301+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
16302+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
16303+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
16304+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
16305+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
16306+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
16307+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
16308+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
16309+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
16310+#endif
16311+
16312+#ifndef GL_SGIX_shadow
16313+#define GL_TEXTURE_COMPARE_SGIX 0x819A
16314+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
16315+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
16316+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
16317+#endif
16318+
16319+#ifndef GL_SGIS_texture_edge_clamp
16320+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
16321+#endif
16322+
16323+#ifndef GL_SGIS_texture_border_clamp
16324+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
16325+#endif
16326+
16327+#ifndef GL_EXT_blend_minmax
16328+#define GL_FUNC_ADD_EXT 0x8006
16329+#define GL_MIN_EXT 0x8007
16330+#define GL_MAX_EXT 0x8008
16331+#define GL_BLEND_EQUATION_EXT 0x8009
16332+#endif
16333+
16334+#ifndef GL_EXT_blend_subtract
16335+#define GL_FUNC_SUBTRACT_EXT 0x800A
16336+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
16337+#endif
16338+
16339+#ifndef GL_EXT_blend_logic_op
16340+#endif
16341+
16342+#ifndef GL_SGIX_interlace
16343+#define GL_INTERLACE_SGIX 0x8094
16344+#endif
16345+
16346+#ifndef GL_SGIX_pixel_tiles
16347+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
16348+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
16349+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
16350+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
16351+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
16352+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
16353+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
16354+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
16355+#endif
16356+
16357+#ifndef GL_SGIS_texture_select
16358+#define GL_DUAL_ALPHA4_SGIS 0x8110
16359+#define GL_DUAL_ALPHA8_SGIS 0x8111
16360+#define GL_DUAL_ALPHA12_SGIS 0x8112
16361+#define GL_DUAL_ALPHA16_SGIS 0x8113
16362+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
16363+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
16364+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
16365+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
16366+#define GL_DUAL_INTENSITY4_SGIS 0x8118
16367+#define GL_DUAL_INTENSITY8_SGIS 0x8119
16368+#define GL_DUAL_INTENSITY12_SGIS 0x811A
16369+#define GL_DUAL_INTENSITY16_SGIS 0x811B
16370+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
16371+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
16372+#define GL_QUAD_ALPHA4_SGIS 0x811E
16373+#define GL_QUAD_ALPHA8_SGIS 0x811F
16374+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
16375+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
16376+#define GL_QUAD_INTENSITY4_SGIS 0x8122
16377+#define GL_QUAD_INTENSITY8_SGIS 0x8123
16378+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
16379+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
16380+#endif
16381+
16382+#ifndef GL_SGIX_sprite
16383+#define GL_SPRITE_SGIX 0x8148
16384+#define GL_SPRITE_MODE_SGIX 0x8149
16385+#define GL_SPRITE_AXIS_SGIX 0x814A
16386+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
16387+#define GL_SPRITE_AXIAL_SGIX 0x814C
16388+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
16389+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
16390+#endif
16391+
16392+#ifndef GL_SGIX_texture_multi_buffer
16393+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
16394+#endif
16395+
16396+#ifndef GL_EXT_point_parameters
16397+#define GL_POINT_SIZE_MIN_EXT 0x8126
16398+#define GL_POINT_SIZE_MAX_EXT 0x8127
16399+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
16400+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
16401+#endif
16402+
16403+#ifndef GL_SGIS_point_parameters
16404+#define GL_POINT_SIZE_MIN_SGIS 0x8126
16405+#define GL_POINT_SIZE_MAX_SGIS 0x8127
16406+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
16407+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
16408+#endif
16409+
16410+#ifndef GL_SGIX_instruments
16411+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
16412+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
16413+#endif
16414+
16415+#ifndef GL_SGIX_texture_scale_bias
16416+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
16417+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
16418+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
16419+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
16420+#endif
16421+
16422+#ifndef GL_SGIX_framezoom
16423+#define GL_FRAMEZOOM_SGIX 0x818B
16424+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
16425+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
16426+#endif
16427+
16428+#ifndef GL_SGIX_tag_sample_buffer
16429+#endif
16430+
16431+#ifndef GL_FfdMaskSGIX
16432+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
16433+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
16434+#endif
16435+
16436+#ifndef GL_SGIX_polynomial_ffd
16437+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
16438+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
16439+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
16440+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
16441+#endif
16442+
16443+#ifndef GL_SGIX_reference_plane
16444+#define GL_REFERENCE_PLANE_SGIX 0x817D
16445+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
16446+#endif
16447+
16448+#ifndef GL_SGIX_flush_raster
16449+#endif
16450+
16451+#ifndef GL_SGIX_depth_texture
16452+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
16453+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
16454+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
16455+#endif
16456+
16457+#ifndef GL_SGIS_fog_function
16458+#define GL_FOG_FUNC_SGIS 0x812A
16459+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
16460+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
16461+#endif
16462+
16463+#ifndef GL_SGIX_fog_offset
16464+#define GL_FOG_OFFSET_SGIX 0x8198
16465+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
16466+#endif
16467+
16468+#ifndef GL_HP_image_transform
16469+#define GL_IMAGE_SCALE_X_HP 0x8155
16470+#define GL_IMAGE_SCALE_Y_HP 0x8156
16471+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
16472+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
16473+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
16474+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
16475+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
16476+#define GL_IMAGE_MAG_FILTER_HP 0x815C
16477+#define GL_IMAGE_MIN_FILTER_HP 0x815D
16478+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
16479+#define GL_CUBIC_HP 0x815F
16480+#define GL_AVERAGE_HP 0x8160
16481+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
16482+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
16483+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
16484+#endif
16485+
16486+#ifndef GL_HP_convolution_border_modes
16487+#define GL_IGNORE_BORDER_HP 0x8150
16488+#define GL_CONSTANT_BORDER_HP 0x8151
16489+#define GL_REPLICATE_BORDER_HP 0x8153
16490+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
16491+#endif
16492+
16493+#ifndef GL_INGR_palette_buffer
16494+#endif
16495+
16496+#ifndef GL_SGIX_texture_add_env
16497+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
16498+#endif
16499+
16500+#ifndef GL_EXT_color_subtable
16501+#endif
16502+
16503+#ifndef GL_PGI_vertex_hints
16504+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
16505+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
16506+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
16507+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
16508+#define GL_COLOR3_BIT_PGI 0x00010000
16509+#define GL_COLOR4_BIT_PGI 0x00020000
16510+#define GL_EDGEFLAG_BIT_PGI 0x00040000
16511+#define GL_INDEX_BIT_PGI 0x00080000
16512+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
16513+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
16514+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
16515+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
16516+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
16517+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
16518+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
16519+#define GL_NORMAL_BIT_PGI 0x08000000
16520+#define GL_TEXCOORD1_BIT_PGI 0x10000000
16521+#define GL_TEXCOORD2_BIT_PGI 0x20000000
16522+#define GL_TEXCOORD3_BIT_PGI 0x40000000
16523+#define GL_TEXCOORD4_BIT_PGI 0x80000000
16524+#define GL_VERTEX23_BIT_PGI 0x00000004
16525+#define GL_VERTEX4_BIT_PGI 0x00000008
16526+#endif
16527+
16528+#ifndef GL_PGI_misc_hints
16529+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
16530+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
16531+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
16532+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
16533+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
16534+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
16535+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
16536+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
16537+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
16538+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
16539+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
16540+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
16541+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
16542+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
16543+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
16544+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
16545+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
16546+#define GL_CLIP_FAR_HINT_PGI 0x1A221
16547+#define GL_WIDE_LINE_HINT_PGI 0x1A222
16548+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
16549+#endif
16550+
16551+#ifndef GL_EXT_paletted_texture
16552+#define GL_COLOR_INDEX1_EXT 0x80E2
16553+#define GL_COLOR_INDEX2_EXT 0x80E3
16554+#define GL_COLOR_INDEX4_EXT 0x80E4
16555+#define GL_COLOR_INDEX8_EXT 0x80E5
16556+#define GL_COLOR_INDEX12_EXT 0x80E6
16557+#define GL_COLOR_INDEX16_EXT 0x80E7
16558+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
16559+#endif
16560+
16561+#ifndef GL_EXT_clip_volume_hint
16562+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
16563+#endif
16564+
16565+#ifndef GL_SGIX_list_priority
16566+#define GL_LIST_PRIORITY_SGIX 0x8182
16567+#endif
16568+
16569+#ifndef GL_SGIX_ir_instrument1
16570+#define GL_IR_INSTRUMENT1_SGIX 0x817F
16571+#endif
16572+
16573+#ifndef GL_SGIX_calligraphic_fragment
16574+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
16575+#endif
16576+
16577+#ifndef GL_SGIX_texture_lod_bias
16578+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
16579+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
16580+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
16581+#endif
16582+
16583+#ifndef GL_SGIX_shadow_ambient
16584+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
16585+#endif
16586+
16587+#ifndef GL_EXT_index_texture
16588+#endif
16589+
16590+#ifndef GL_EXT_index_material
16591+#define GL_INDEX_MATERIAL_EXT 0x81B8
16592+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
16593+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
16594+#endif
16595+
16596+#ifndef GL_EXT_index_func
16597+#define GL_INDEX_TEST_EXT 0x81B5
16598+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
16599+#define GL_INDEX_TEST_REF_EXT 0x81B7
16600+#endif
16601+
16602+#ifndef GL_EXT_index_array_formats
16603+#define GL_IUI_V2F_EXT 0x81AD
16604+#define GL_IUI_V3F_EXT 0x81AE
16605+#define GL_IUI_N3F_V2F_EXT 0x81AF
16606+#define GL_IUI_N3F_V3F_EXT 0x81B0
16607+#define GL_T2F_IUI_V2F_EXT 0x81B1
16608+#define GL_T2F_IUI_V3F_EXT 0x81B2
16609+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
16610+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
16611+#endif
16612+
16613+#ifndef GL_EXT_compiled_vertex_array
16614+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
16615+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
16616+#endif
16617+
16618+#ifndef GL_EXT_cull_vertex
16619+#define GL_CULL_VERTEX_EXT 0x81AA
16620+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
16621+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
16622+#endif
16623+
16624+#ifndef GL_SGIX_ycrcb
16625+#define GL_YCRCB_422_SGIX 0x81BB
16626+#define GL_YCRCB_444_SGIX 0x81BC
16627+#endif
16628+
16629+#ifndef GL_SGIX_fragment_lighting
16630+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
16631+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
16632+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
16633+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
16634+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
16635+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
16636+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
16637+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
16638+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
16639+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
16640+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
16641+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
16642+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
16643+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
16644+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
16645+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
16646+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
16647+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
16648+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
16649+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
16650+#endif
16651+
16652+#ifndef GL_IBM_rasterpos_clip
16653+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
16654+#endif
16655+
16656+#ifndef GL_HP_texture_lighting
16657+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
16658+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
16659+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
16660+#endif
16661+
16662+#ifndef GL_EXT_draw_range_elements
16663+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
16664+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
16665+#endif
16666+
16667+#ifndef GL_WIN_phong_shading
16668+#define GL_PHONG_WIN 0x80EA
16669+#define GL_PHONG_HINT_WIN 0x80EB
16670+#endif
16671+
16672+#ifndef GL_WIN_specular_fog
16673+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
16674+#endif
16675+
16676+#ifndef GL_EXT_light_texture
16677+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
16678+#define GL_FRAGMENT_NORMAL_EXT 0x834A
16679+#define GL_FRAGMENT_COLOR_EXT 0x834C
16680+#define GL_ATTENUATION_EXT 0x834D
16681+#define GL_SHADOW_ATTENUATION_EXT 0x834E
16682+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
16683+#define GL_TEXTURE_LIGHT_EXT 0x8350
16684+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
16685+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
16686+/* reuse GL_FRAGMENT_DEPTH_EXT */
16687+#endif
16688+
16689+#ifndef GL_SGIX_blend_alpha_minmax
16690+#define GL_ALPHA_MIN_SGIX 0x8320
16691+#define GL_ALPHA_MAX_SGIX 0x8321
16692+#endif
16693+
16694+#ifndef GL_SGIX_impact_pixel_texture
16695+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
16696+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
16697+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
16698+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
16699+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
16700+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
16701+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
16702+#endif
16703+
16704+#ifndef GL_EXT_bgra
16705+#define GL_BGR_EXT 0x80E0
16706+#define GL_BGRA_EXT 0x80E1
16707+#endif
16708+
16709+#ifndef GL_SGIX_async
16710+#define GL_ASYNC_MARKER_SGIX 0x8329
16711+#endif
16712+
16713+#ifndef GL_SGIX_async_pixel
16714+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
16715+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
16716+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
16717+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
16718+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
16719+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
16720+#endif
16721+
16722+#ifndef GL_SGIX_async_histogram
16723+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
16724+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
16725+#endif
16726+
16727+#ifndef GL_INTEL_texture_scissor
16728+#endif
16729+
16730+#ifndef GL_INTEL_parallel_arrays
16731+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
16732+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
16733+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
16734+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
16735+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
16736+#endif
16737+
16738+#ifndef GL_HP_occlusion_test
16739+#define GL_OCCLUSION_TEST_HP 0x8165
16740+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
16741+#endif
16742+
16743+#ifndef GL_EXT_pixel_transform
16744+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
16745+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
16746+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
16747+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
16748+#define GL_CUBIC_EXT 0x8334
16749+#define GL_AVERAGE_EXT 0x8335
16750+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
16751+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
16752+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
16753+#endif
16754+
16755+#ifndef GL_EXT_pixel_transform_color_table
16756+#endif
16757+
16758+#ifndef GL_EXT_shared_texture_palette
16759+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
16760+#endif
16761+
16762+#ifndef GL_EXT_separate_specular_color
16763+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
16764+#define GL_SINGLE_COLOR_EXT 0x81F9
16765+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
16766+#endif
16767+
16768+#ifndef GL_EXT_secondary_color
16769+#define GL_COLOR_SUM_EXT 0x8458
16770+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
16771+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
16772+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
16773+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
16774+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
16775+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
16776+#endif
16777+
16778+#ifndef GL_EXT_texture_perturb_normal
16779+#define GL_PERTURB_EXT 0x85AE
16780+#define GL_TEXTURE_NORMAL_EXT 0x85AF
16781+#endif
16782+
16783+#ifndef GL_EXT_multi_draw_arrays
16784+#endif
16785+
16786+#ifndef GL_EXT_fog_coord
16787+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
16788+#define GL_FOG_COORDINATE_EXT 0x8451
16789+#define GL_FRAGMENT_DEPTH_EXT 0x8452
16790+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
16791+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
16792+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
16793+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
16794+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
16795+#endif
16796+
16797+#ifndef GL_REND_screen_coordinates
16798+#define GL_SCREEN_COORDINATES_REND 0x8490
16799+#define GL_INVERTED_SCREEN_W_REND 0x8491
16800+#endif
16801+
16802+#ifndef GL_EXT_coordinate_frame
16803+#define GL_TANGENT_ARRAY_EXT 0x8439
16804+#define GL_BINORMAL_ARRAY_EXT 0x843A
16805+#define GL_CURRENT_TANGENT_EXT 0x843B
16806+#define GL_CURRENT_BINORMAL_EXT 0x843C
16807+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
16808+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
16809+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
16810+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
16811+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
16812+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
16813+#define GL_MAP1_TANGENT_EXT 0x8444
16814+#define GL_MAP2_TANGENT_EXT 0x8445
16815+#define GL_MAP1_BINORMAL_EXT 0x8446
16816+#define GL_MAP2_BINORMAL_EXT 0x8447
16817+#endif
16818+
16819+#ifndef GL_EXT_texture_env_combine
16820+#define GL_COMBINE_EXT 0x8570
16821+#define GL_COMBINE_RGB_EXT 0x8571
16822+#define GL_COMBINE_ALPHA_EXT 0x8572
16823+#define GL_RGB_SCALE_EXT 0x8573
16824+#define GL_ADD_SIGNED_EXT 0x8574
16825+#define GL_INTERPOLATE_EXT 0x8575
16826+#define GL_CONSTANT_EXT 0x8576
16827+#define GL_PRIMARY_COLOR_EXT 0x8577
16828+#define GL_PREVIOUS_EXT 0x8578
16829+#define GL_SOURCE0_RGB_EXT 0x8580
16830+#define GL_SOURCE1_RGB_EXT 0x8581
16831+#define GL_SOURCE2_RGB_EXT 0x8582
16832+#define GL_SOURCE0_ALPHA_EXT 0x8588
16833+#define GL_SOURCE1_ALPHA_EXT 0x8589
16834+#define GL_SOURCE2_ALPHA_EXT 0x858A
16835+#define GL_OPERAND0_RGB_EXT 0x8590
16836+#define GL_OPERAND1_RGB_EXT 0x8591
16837+#define GL_OPERAND2_RGB_EXT 0x8592
16838+#define GL_OPERAND0_ALPHA_EXT 0x8598
16839+#define GL_OPERAND1_ALPHA_EXT 0x8599
16840+#define GL_OPERAND2_ALPHA_EXT 0x859A
16841+#endif
16842+
16843+#ifndef GL_APPLE_specular_vector
16844+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
16845+#endif
16846+
16847+#ifndef GL_APPLE_transform_hint
16848+#define GL_TRANSFORM_HINT_APPLE 0x85B1
16849+#endif
16850+
16851+#ifndef GL_SGIX_fog_scale
16852+#define GL_FOG_SCALE_SGIX 0x81FC
16853+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
16854+#endif
16855+
16856+#ifndef GL_SUNX_constant_data
16857+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
16858+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
16859+#endif
16860+
16861+#ifndef GL_SUN_global_alpha
16862+#define GL_GLOBAL_ALPHA_SUN 0x81D9
16863+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
16864+#endif
16865+
16866+#ifndef GL_SUN_triangle_list
16867+#define GL_RESTART_SUN 0x0001
16868+#define GL_REPLACE_MIDDLE_SUN 0x0002
16869+#define GL_REPLACE_OLDEST_SUN 0x0003
16870+#define GL_TRIANGLE_LIST_SUN 0x81D7
16871+#define GL_REPLACEMENT_CODE_SUN 0x81D8
16872+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
16873+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
16874+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
16875+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
16876+#define GL_R1UI_V3F_SUN 0x85C4
16877+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
16878+#define GL_R1UI_C3F_V3F_SUN 0x85C6
16879+#define GL_R1UI_N3F_V3F_SUN 0x85C7
16880+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
16881+#define GL_R1UI_T2F_V3F_SUN 0x85C9
16882+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
16883+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
16884+#endif
16885+
16886+#ifndef GL_SUN_vertex
16887+#endif
16888+
16889+#ifndef GL_EXT_blend_func_separate
16890+#define GL_BLEND_DST_RGB_EXT 0x80C8
16891+#define GL_BLEND_SRC_RGB_EXT 0x80C9
16892+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
16893+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
16894+#endif
16895+
16896+#ifndef GL_INGR_color_clamp
16897+#define GL_RED_MIN_CLAMP_INGR 0x8560
16898+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
16899+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
16900+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
16901+#define GL_RED_MAX_CLAMP_INGR 0x8564
16902+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
16903+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
16904+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
16905+#endif
16906+
16907+#ifndef GL_INGR_interlace_read
16908+#define GL_INTERLACE_READ_INGR 0x8568
16909+#endif
16910+
16911+#ifndef GL_EXT_stencil_wrap
16912+#define GL_INCR_WRAP_EXT 0x8507
16913+#define GL_DECR_WRAP_EXT 0x8508
16914+#endif
16915+
16916+#ifndef GL_EXT_422_pixels
16917+#define GL_422_EXT 0x80CC
16918+#define GL_422_REV_EXT 0x80CD
16919+#define GL_422_AVERAGE_EXT 0x80CE
16920+#define GL_422_REV_AVERAGE_EXT 0x80CF
16921+#endif
16922+
16923+#ifndef GL_NV_texgen_reflection
16924+#define GL_NORMAL_MAP_NV 0x8511
16925+#define GL_REFLECTION_MAP_NV 0x8512
16926+#endif
16927+
16928+#ifndef GL_EXT_texture_cube_map
16929+#define GL_NORMAL_MAP_EXT 0x8511
16930+#define GL_REFLECTION_MAP_EXT 0x8512
16931+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
16932+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
16933+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
16934+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
16935+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
16936+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
16937+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
16938+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
16939+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
16940+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
16941+#endif
16942+
16943+#ifndef GL_SUN_convolution_border_modes
16944+#define GL_WRAP_BORDER_SUN 0x81D4
16945+#endif
16946+
16947+#ifndef GL_EXT_texture_env_add
16948+#endif
16949+
16950+#ifndef GL_EXT_texture_lod_bias
16951+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
16952+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
16953+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
16954+#endif
16955+
16956+#ifndef GL_EXT_texture_filter_anisotropic
16957+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
16958+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
16959+#endif
16960+
16961+#ifndef GL_EXT_vertex_weighting
16962+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
16963+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
16964+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
16965+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
16966+#define GL_VERTEX_WEIGHTING_EXT 0x8509
16967+#define GL_MODELVIEW0_EXT GL_MODELVIEW
16968+#define GL_MODELVIEW1_EXT 0x850A
16969+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
16970+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
16971+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
16972+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
16973+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
16974+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
16975+#endif
16976+
16977+#ifndef GL_NV_light_max_exponent
16978+#define GL_MAX_SHININESS_NV 0x8504
16979+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
16980+#endif
16981+
16982+#ifndef GL_NV_vertex_array_range
16983+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
16984+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
16985+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
16986+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
16987+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
16988+#endif
16989+
16990+#ifndef GL_NV_register_combiners
16991+#define GL_REGISTER_COMBINERS_NV 0x8522
16992+#define GL_VARIABLE_A_NV 0x8523
16993+#define GL_VARIABLE_B_NV 0x8524
16994+#define GL_VARIABLE_C_NV 0x8525
16995+#define GL_VARIABLE_D_NV 0x8526
16996+#define GL_VARIABLE_E_NV 0x8527
16997+#define GL_VARIABLE_F_NV 0x8528
16998+#define GL_VARIABLE_G_NV 0x8529
16999+#define GL_CONSTANT_COLOR0_NV 0x852A
17000+#define GL_CONSTANT_COLOR1_NV 0x852B
17001+#define GL_PRIMARY_COLOR_NV 0x852C
17002+#define GL_SECONDARY_COLOR_NV 0x852D
17003+#define GL_SPARE0_NV 0x852E
17004+#define GL_SPARE1_NV 0x852F
17005+#define GL_DISCARD_NV 0x8530
17006+#define GL_E_TIMES_F_NV 0x8531
17007+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
17008+#define GL_UNSIGNED_IDENTITY_NV 0x8536
17009+#define GL_UNSIGNED_INVERT_NV 0x8537
17010+#define GL_EXPAND_NORMAL_NV 0x8538
17011+#define GL_EXPAND_NEGATE_NV 0x8539
17012+#define GL_HALF_BIAS_NORMAL_NV 0x853A
17013+#define GL_HALF_BIAS_NEGATE_NV 0x853B
17014+#define GL_SIGNED_IDENTITY_NV 0x853C
17015+#define GL_SIGNED_NEGATE_NV 0x853D
17016+#define GL_SCALE_BY_TWO_NV 0x853E
17017+#define GL_SCALE_BY_FOUR_NV 0x853F
17018+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
17019+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
17020+#define GL_COMBINER_INPUT_NV 0x8542
17021+#define GL_COMBINER_MAPPING_NV 0x8543
17022+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
17023+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
17024+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
17025+#define GL_COMBINER_MUX_SUM_NV 0x8547
17026+#define GL_COMBINER_SCALE_NV 0x8548
17027+#define GL_COMBINER_BIAS_NV 0x8549
17028+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
17029+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
17030+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
17031+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
17032+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
17033+#define GL_COLOR_SUM_CLAMP_NV 0x854F
17034+#define GL_COMBINER0_NV 0x8550
17035+#define GL_COMBINER1_NV 0x8551
17036+#define GL_COMBINER2_NV 0x8552
17037+#define GL_COMBINER3_NV 0x8553
17038+#define GL_COMBINER4_NV 0x8554
17039+#define GL_COMBINER5_NV 0x8555
17040+#define GL_COMBINER6_NV 0x8556
17041+#define GL_COMBINER7_NV 0x8557
17042+/* reuse GL_TEXTURE0_ARB */
17043+/* reuse GL_TEXTURE1_ARB */
17044+/* reuse GL_ZERO */
17045+/* reuse GL_NONE */
17046+/* reuse GL_FOG */
17047+#endif
17048+
17049+#ifndef GL_NV_fog_distance
17050+#define GL_FOG_DISTANCE_MODE_NV 0x855A
17051+#define GL_EYE_RADIAL_NV 0x855B
17052+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
17053+/* reuse GL_EYE_PLANE */
17054+#endif
17055+
17056+#ifndef GL_NV_texgen_emboss
17057+#define GL_EMBOSS_LIGHT_NV 0x855D
17058+#define GL_EMBOSS_CONSTANT_NV 0x855E
17059+#define GL_EMBOSS_MAP_NV 0x855F
17060+#endif
17061+
17062+#ifndef GL_NV_blend_square
17063+#endif
17064+
17065+#ifndef GL_NV_texture_env_combine4
17066+#define GL_COMBINE4_NV 0x8503
17067+#define GL_SOURCE3_RGB_NV 0x8583
17068+#define GL_SOURCE3_ALPHA_NV 0x858B
17069+#define GL_OPERAND3_RGB_NV 0x8593
17070+#define GL_OPERAND3_ALPHA_NV 0x859B
17071+#endif
17072+
17073+#ifndef GL_MESA_resize_buffers
17074+#endif
17075+
17076+#ifndef GL_MESA_window_pos
17077+#endif
17078+
17079+#ifndef GL_EXT_texture_compression_s3tc
17080+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
17081+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
17082+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
17083+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
17084+#endif
17085+
17086+#ifndef GL_IBM_cull_vertex
17087+#define GL_CULL_VERTEX_IBM 103050
17088+#endif
17089+
17090+#ifndef GL_IBM_multimode_draw_arrays
17091+#endif
17092+
17093+#ifndef GL_IBM_vertex_array_lists
17094+#define GL_VERTEX_ARRAY_LIST_IBM 103070
17095+#define GL_NORMAL_ARRAY_LIST_IBM 103071
17096+#define GL_COLOR_ARRAY_LIST_IBM 103072
17097+#define GL_INDEX_ARRAY_LIST_IBM 103073
17098+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
17099+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
17100+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
17101+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
17102+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
17103+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
17104+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
17105+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
17106+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
17107+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
17108+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
17109+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
17110+#endif
17111+
17112+#ifndef GL_SGIX_subsample
17113+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
17114+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
17115+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
17116+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
17117+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
17118+#endif
17119+
17120+#ifndef GL_SGIX_ycrcb_subsample
17121+#endif
17122+
17123+#ifndef GL_SGIX_ycrcba
17124+#define GL_YCRCB_SGIX 0x8318
17125+#define GL_YCRCBA_SGIX 0x8319
17126+#endif
17127+
17128+#ifndef GL_SGI_depth_pass_instrument
17129+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
17130+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
17131+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
17132+#endif
17133+
17134+#ifndef GL_3DFX_texture_compression_FXT1
17135+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
17136+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
17137+#endif
17138+
17139+#ifndef GL_3DFX_multisample
17140+#define GL_MULTISAMPLE_3DFX 0x86B2
17141+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
17142+#define GL_SAMPLES_3DFX 0x86B4
17143+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
17144+#endif
17145+
17146+#ifndef GL_3DFX_tbuffer
17147+#endif
17148+
17149+#ifndef GL_EXT_multisample
17150+#define GL_MULTISAMPLE_EXT 0x809D
17151+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
17152+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
17153+#define GL_SAMPLE_MASK_EXT 0x80A0
17154+#define GL_1PASS_EXT 0x80A1
17155+#define GL_2PASS_0_EXT 0x80A2
17156+#define GL_2PASS_1_EXT 0x80A3
17157+#define GL_4PASS_0_EXT 0x80A4
17158+#define GL_4PASS_1_EXT 0x80A5
17159+#define GL_4PASS_2_EXT 0x80A6
17160+#define GL_4PASS_3_EXT 0x80A7
17161+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
17162+#define GL_SAMPLES_EXT 0x80A9
17163+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
17164+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
17165+#define GL_SAMPLE_PATTERN_EXT 0x80AC
17166+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
17167+#endif
17168+
17169+#ifndef GL_SGIX_vertex_preclip
17170+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
17171+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
17172+#endif
17173+
17174+#ifndef GL_SGIX_convolution_accuracy
17175+#define GL_CONVOLUTION_HINT_SGIX 0x8316
17176+#endif
17177+
17178+#ifndef GL_SGIX_resample
17179+#define GL_PACK_RESAMPLE_SGIX 0x842C
17180+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
17181+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
17182+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
17183+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
17184+#endif
17185+
17186+#ifndef GL_SGIS_point_line_texgen
17187+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
17188+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
17189+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
17190+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
17191+#define GL_EYE_POINT_SGIS 0x81F4
17192+#define GL_OBJECT_POINT_SGIS 0x81F5
17193+#define GL_EYE_LINE_SGIS 0x81F6
17194+#define GL_OBJECT_LINE_SGIS 0x81F7
17195+#endif
17196+
17197+#ifndef GL_SGIS_texture_color_mask
17198+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
17199+#endif
17200+
17201+#ifndef GL_EXT_texture_env_dot3
17202+#define GL_DOT3_RGB_EXT 0x8740
17203+#define GL_DOT3_RGBA_EXT 0x8741
17204+#endif
17205+
17206+#ifndef GL_ATI_texture_mirror_once
17207+#define GL_MIRROR_CLAMP_ATI 0x8742
17208+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
17209+#endif
17210+
17211+#ifndef GL_NV_fence
17212+#define GL_ALL_COMPLETED_NV 0x84F2
17213+#define GL_FENCE_STATUS_NV 0x84F3
17214+#define GL_FENCE_CONDITION_NV 0x84F4
17215+#endif
17216+
17217+#ifndef GL_IBM_texture_mirrored_repeat
17218+#define GL_MIRRORED_REPEAT_IBM 0x8370
17219+#endif
17220+
17221+#ifndef GL_NV_evaluators
17222+#define GL_EVAL_2D_NV 0x86C0
17223+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
17224+#define GL_MAP_TESSELLATION_NV 0x86C2
17225+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
17226+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
17227+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
17228+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
17229+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
17230+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
17231+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
17232+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
17233+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
17234+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
17235+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
17236+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
17237+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
17238+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
17239+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
17240+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
17241+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
17242+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
17243+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
17244+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
17245+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
17246+#endif
17247+
17248+#ifndef GL_NV_packed_depth_stencil
17249+#define GL_DEPTH_STENCIL_NV 0x84F9
17250+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
17251+#endif
17252+
17253+#ifndef GL_NV_register_combiners2
17254+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
17255+#endif
17256+
17257+#ifndef GL_NV_texture_compression_vtc
17258+#endif
17259+
17260+#ifndef GL_NV_texture_rectangle
17261+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
17262+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
17263+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
17264+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
17265+#endif
17266+
17267+#ifndef GL_NV_texture_shader
17268+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
17269+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
17270+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
17271+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
17272+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
17273+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
17274+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
17275+#define GL_SHADER_CONSISTENT_NV 0x86DD
17276+#define GL_TEXTURE_SHADER_NV 0x86DE
17277+#define GL_SHADER_OPERATION_NV 0x86DF
17278+#define GL_CULL_MODES_NV 0x86E0
17279+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
17280+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
17281+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
17282+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
17283+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
17284+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
17285+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
17286+#define GL_CONST_EYE_NV 0x86E5
17287+#define GL_PASS_THROUGH_NV 0x86E6
17288+#define GL_CULL_FRAGMENT_NV 0x86E7
17289+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
17290+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
17291+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
17292+#define GL_DOT_PRODUCT_NV 0x86EC
17293+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
17294+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
17295+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
17296+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
17297+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
17298+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
17299+#define GL_HILO_NV 0x86F4
17300+#define GL_DSDT_NV 0x86F5
17301+#define GL_DSDT_MAG_NV 0x86F6
17302+#define GL_DSDT_MAG_VIB_NV 0x86F7
17303+#define GL_HILO16_NV 0x86F8
17304+#define GL_SIGNED_HILO_NV 0x86F9
17305+#define GL_SIGNED_HILO16_NV 0x86FA
17306+#define GL_SIGNED_RGBA_NV 0x86FB
17307+#define GL_SIGNED_RGBA8_NV 0x86FC
17308+#define GL_SIGNED_RGB_NV 0x86FE
17309+#define GL_SIGNED_RGB8_NV 0x86FF
17310+#define GL_SIGNED_LUMINANCE_NV 0x8701
17311+#define GL_SIGNED_LUMINANCE8_NV 0x8702
17312+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
17313+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
17314+#define GL_SIGNED_ALPHA_NV 0x8705
17315+#define GL_SIGNED_ALPHA8_NV 0x8706
17316+#define GL_SIGNED_INTENSITY_NV 0x8707
17317+#define GL_SIGNED_INTENSITY8_NV 0x8708
17318+#define GL_DSDT8_NV 0x8709
17319+#define GL_DSDT8_MAG8_NV 0x870A
17320+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
17321+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
17322+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
17323+#define GL_HI_SCALE_NV 0x870E
17324+#define GL_LO_SCALE_NV 0x870F
17325+#define GL_DS_SCALE_NV 0x8710
17326+#define GL_DT_SCALE_NV 0x8711
17327+#define GL_MAGNITUDE_SCALE_NV 0x8712
17328+#define GL_VIBRANCE_SCALE_NV 0x8713
17329+#define GL_HI_BIAS_NV 0x8714
17330+#define GL_LO_BIAS_NV 0x8715
17331+#define GL_DS_BIAS_NV 0x8716
17332+#define GL_DT_BIAS_NV 0x8717
17333+#define GL_MAGNITUDE_BIAS_NV 0x8718
17334+#define GL_VIBRANCE_BIAS_NV 0x8719
17335+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
17336+#define GL_TEXTURE_HI_SIZE_NV 0x871B
17337+#define GL_TEXTURE_LO_SIZE_NV 0x871C
17338+#define GL_TEXTURE_DS_SIZE_NV 0x871D
17339+#define GL_TEXTURE_DT_SIZE_NV 0x871E
17340+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
17341+#endif
17342+
17343+#ifndef GL_NV_texture_shader2
17344+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
17345+#endif
17346+
17347+#ifndef GL_NV_vertex_array_range2
17348+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
17349+#endif
17350+
17351+#ifndef GL_NV_vertex_program
17352+#define GL_VERTEX_PROGRAM_NV 0x8620
17353+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
17354+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
17355+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
17356+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
17357+#define GL_CURRENT_ATTRIB_NV 0x8626
17358+#define GL_PROGRAM_LENGTH_NV 0x8627
17359+#define GL_PROGRAM_STRING_NV 0x8628
17360+#define GL_MODELVIEW_PROJECTION_NV 0x8629
17361+#define GL_IDENTITY_NV 0x862A
17362+#define GL_INVERSE_NV 0x862B
17363+#define GL_TRANSPOSE_NV 0x862C
17364+#define GL_INVERSE_TRANSPOSE_NV 0x862D
17365+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
17366+#define GL_MAX_TRACK_MATRICES_NV 0x862F
17367+#define GL_MATRIX0_NV 0x8630
17368+#define GL_MATRIX1_NV 0x8631
17369+#define GL_MATRIX2_NV 0x8632
17370+#define GL_MATRIX3_NV 0x8633
17371+#define GL_MATRIX4_NV 0x8634
17372+#define GL_MATRIX5_NV 0x8635
17373+#define GL_MATRIX6_NV 0x8636
17374+#define GL_MATRIX7_NV 0x8637
17375+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
17376+#define GL_CURRENT_MATRIX_NV 0x8641
17377+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
17378+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
17379+#define GL_PROGRAM_PARAMETER_NV 0x8644
17380+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
17381+#define GL_PROGRAM_TARGET_NV 0x8646
17382+#define GL_PROGRAM_RESIDENT_NV 0x8647
17383+#define GL_TRACK_MATRIX_NV 0x8648
17384+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
17385+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
17386+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
17387+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
17388+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
17389+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
17390+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
17391+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
17392+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
17393+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
17394+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
17395+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
17396+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
17397+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
17398+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
17399+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
17400+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
17401+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
17402+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
17403+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
17404+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
17405+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
17406+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
17407+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
17408+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
17409+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
17410+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
17411+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
17412+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
17413+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
17414+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
17415+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
17416+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
17417+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
17418+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
17419+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
17420+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
17421+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
17422+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
17423+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
17424+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
17425+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
17426+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
17427+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
17428+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
17429+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
17430+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
17431+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
17432+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
17433+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
17434+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
17435+#endif
17436+
17437+#ifndef GL_SGIX_texture_coordinate_clamp
17438+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
17439+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
17440+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
17441+#endif
17442+
17443+#ifndef GL_SGIX_scalebias_hint
17444+#define GL_SCALEBIAS_HINT_SGIX 0x8322
17445+#endif
17446+
17447+#ifndef GL_OML_interlace
17448+#define GL_INTERLACE_OML 0x8980
17449+#define GL_INTERLACE_READ_OML 0x8981
17450+#endif
17451+
17452+#ifndef GL_OML_subsample
17453+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
17454+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
17455+#endif
17456+
17457+#ifndef GL_OML_resample
17458+#define GL_PACK_RESAMPLE_OML 0x8984
17459+#define GL_UNPACK_RESAMPLE_OML 0x8985
17460+#define GL_RESAMPLE_REPLICATE_OML 0x8986
17461+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
17462+#define GL_RESAMPLE_AVERAGE_OML 0x8988
17463+#define GL_RESAMPLE_DECIMATE_OML 0x8989
17464+#endif
17465+
17466+#ifndef GL_NV_copy_depth_to_color
17467+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
17468+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
17469+#endif
17470+
17471+#ifndef GL_ATI_envmap_bumpmap
17472+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
17473+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
17474+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
17475+#define GL_BUMP_TEX_UNITS_ATI 0x8778
17476+#define GL_DUDV_ATI 0x8779
17477+#define GL_DU8DV8_ATI 0x877A
17478+#define GL_BUMP_ENVMAP_ATI 0x877B
17479+#define GL_BUMP_TARGET_ATI 0x877C
17480+#endif
17481+
17482+#ifndef GL_ATI_fragment_shader
17483+#define GL_FRAGMENT_SHADER_ATI 0x8920
17484+#define GL_REG_0_ATI 0x8921
17485+#define GL_REG_1_ATI 0x8922
17486+#define GL_REG_2_ATI 0x8923
17487+#define GL_REG_3_ATI 0x8924
17488+#define GL_REG_4_ATI 0x8925
17489+#define GL_REG_5_ATI 0x8926
17490+#define GL_REG_6_ATI 0x8927
17491+#define GL_REG_7_ATI 0x8928
17492+#define GL_REG_8_ATI 0x8929
17493+#define GL_REG_9_ATI 0x892A
17494+#define GL_REG_10_ATI 0x892B
17495+#define GL_REG_11_ATI 0x892C
17496+#define GL_REG_12_ATI 0x892D
17497+#define GL_REG_13_ATI 0x892E
17498+#define GL_REG_14_ATI 0x892F
17499+#define GL_REG_15_ATI 0x8930
17500+#define GL_REG_16_ATI 0x8931
17501+#define GL_REG_17_ATI 0x8932
17502+#define GL_REG_18_ATI 0x8933
17503+#define GL_REG_19_ATI 0x8934
17504+#define GL_REG_20_ATI 0x8935
17505+#define GL_REG_21_ATI 0x8936
17506+#define GL_REG_22_ATI 0x8937
17507+#define GL_REG_23_ATI 0x8938
17508+#define GL_REG_24_ATI 0x8939
17509+#define GL_REG_25_ATI 0x893A
17510+#define GL_REG_26_ATI 0x893B
17511+#define GL_REG_27_ATI 0x893C
17512+#define GL_REG_28_ATI 0x893D
17513+#define GL_REG_29_ATI 0x893E
17514+#define GL_REG_30_ATI 0x893F
17515+#define GL_REG_31_ATI 0x8940
17516+#define GL_CON_0_ATI 0x8941
17517+#define GL_CON_1_ATI 0x8942
17518+#define GL_CON_2_ATI 0x8943
17519+#define GL_CON_3_ATI 0x8944
17520+#define GL_CON_4_ATI 0x8945
17521+#define GL_CON_5_ATI 0x8946
17522+#define GL_CON_6_ATI 0x8947
17523+#define GL_CON_7_ATI 0x8948
17524+#define GL_CON_8_ATI 0x8949
17525+#define GL_CON_9_ATI 0x894A
17526+#define GL_CON_10_ATI 0x894B
17527+#define GL_CON_11_ATI 0x894C
17528+#define GL_CON_12_ATI 0x894D
17529+#define GL_CON_13_ATI 0x894E
17530+#define GL_CON_14_ATI 0x894F
17531+#define GL_CON_15_ATI 0x8950
17532+#define GL_CON_16_ATI 0x8951
17533+#define GL_CON_17_ATI 0x8952
17534+#define GL_CON_18_ATI 0x8953
17535+#define GL_CON_19_ATI 0x8954
17536+#define GL_CON_20_ATI 0x8955
17537+#define GL_CON_21_ATI 0x8956
17538+#define GL_CON_22_ATI 0x8957
17539+#define GL_CON_23_ATI 0x8958
17540+#define GL_CON_24_ATI 0x8959
17541+#define GL_CON_25_ATI 0x895A
17542+#define GL_CON_26_ATI 0x895B
17543+#define GL_CON_27_ATI 0x895C
17544+#define GL_CON_28_ATI 0x895D
17545+#define GL_CON_29_ATI 0x895E
17546+#define GL_CON_30_ATI 0x895F
17547+#define GL_CON_31_ATI 0x8960
17548+#define GL_MOV_ATI 0x8961
17549+#define GL_ADD_ATI 0x8963
17550+#define GL_MUL_ATI 0x8964
17551+#define GL_SUB_ATI 0x8965
17552+#define GL_DOT3_ATI 0x8966
17553+#define GL_DOT4_ATI 0x8967
17554+#define GL_MAD_ATI 0x8968
17555+#define GL_LERP_ATI 0x8969
17556+#define GL_CND_ATI 0x896A
17557+#define GL_CND0_ATI 0x896B
17558+#define GL_DOT2_ADD_ATI 0x896C
17559+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
17560+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
17561+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
17562+#define GL_NUM_PASSES_ATI 0x8970
17563+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
17564+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
17565+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
17566+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
17567+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
17568+#define GL_SWIZZLE_STR_ATI 0x8976
17569+#define GL_SWIZZLE_STQ_ATI 0x8977
17570+#define GL_SWIZZLE_STR_DR_ATI 0x8978
17571+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
17572+#define GL_SWIZZLE_STRQ_ATI 0x897A
17573+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
17574+#define GL_RED_BIT_ATI 0x00000001
17575+#define GL_GREEN_BIT_ATI 0x00000002
17576+#define GL_BLUE_BIT_ATI 0x00000004
17577+#define GL_2X_BIT_ATI 0x00000001
17578+#define GL_4X_BIT_ATI 0x00000002
17579+#define GL_8X_BIT_ATI 0x00000004
17580+#define GL_HALF_BIT_ATI 0x00000008
17581+#define GL_QUARTER_BIT_ATI 0x00000010
17582+#define GL_EIGHTH_BIT_ATI 0x00000020
17583+#define GL_SATURATE_BIT_ATI 0x00000040
17584+#define GL_COMP_BIT_ATI 0x00000002
17585+#define GL_NEGATE_BIT_ATI 0x00000004
17586+#define GL_BIAS_BIT_ATI 0x00000008
17587+#endif
17588+
17589+#ifndef GL_ATI_pn_triangles
17590+#define GL_PN_TRIANGLES_ATI 0x87F0
17591+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
17592+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
17593+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
17594+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
17595+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
17596+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
17597+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
17598+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
17599+#endif
17600+
17601+#ifndef GL_ATI_vertex_array_object
17602+#define GL_STATIC_ATI 0x8760
17603+#define GL_DYNAMIC_ATI 0x8761
17604+#define GL_PRESERVE_ATI 0x8762
17605+#define GL_DISCARD_ATI 0x8763
17606+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
17607+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
17608+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
17609+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
17610+#endif
17611+
17612+#ifndef GL_EXT_vertex_shader
17613+#define GL_VERTEX_SHADER_EXT 0x8780
17614+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
17615+#define GL_OP_INDEX_EXT 0x8782
17616+#define GL_OP_NEGATE_EXT 0x8783
17617+#define GL_OP_DOT3_EXT 0x8784
17618+#define GL_OP_DOT4_EXT 0x8785
17619+#define GL_OP_MUL_EXT 0x8786
17620+#define GL_OP_ADD_EXT 0x8787
17621+#define GL_OP_MADD_EXT 0x8788
17622+#define GL_OP_FRAC_EXT 0x8789
17623+#define GL_OP_MAX_EXT 0x878A
17624+#define GL_OP_MIN_EXT 0x878B
17625+#define GL_OP_SET_GE_EXT 0x878C
17626+#define GL_OP_SET_LT_EXT 0x878D
17627+#define GL_OP_CLAMP_EXT 0x878E
17628+#define GL_OP_FLOOR_EXT 0x878F
17629+#define GL_OP_ROUND_EXT 0x8790
17630+#define GL_OP_EXP_BASE_2_EXT 0x8791
17631+#define GL_OP_LOG_BASE_2_EXT 0x8792
17632+#define GL_OP_POWER_EXT 0x8793
17633+#define GL_OP_RECIP_EXT 0x8794
17634+#define GL_OP_RECIP_SQRT_EXT 0x8795
17635+#define GL_OP_SUB_EXT 0x8796
17636+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
17637+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
17638+#define GL_OP_MOV_EXT 0x8799
17639+#define GL_OUTPUT_VERTEX_EXT 0x879A
17640+#define GL_OUTPUT_COLOR0_EXT 0x879B
17641+#define GL_OUTPUT_COLOR1_EXT 0x879C
17642+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
17643+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
17644+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
17645+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
17646+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
17647+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
17648+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
17649+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
17650+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
17651+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
17652+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
17653+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
17654+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
17655+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
17656+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
17657+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
17658+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
17659+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
17660+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
17661+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
17662+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
17663+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
17664+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
17665+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
17666+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
17667+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
17668+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
17669+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
17670+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
17671+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
17672+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
17673+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
17674+#define GL_OUTPUT_FOG_EXT 0x87BD
17675+#define GL_SCALAR_EXT 0x87BE
17676+#define GL_VECTOR_EXT 0x87BF
17677+#define GL_MATRIX_EXT 0x87C0
17678+#define GL_VARIANT_EXT 0x87C1
17679+#define GL_INVARIANT_EXT 0x87C2
17680+#define GL_LOCAL_CONSTANT_EXT 0x87C3
17681+#define GL_LOCAL_EXT 0x87C4
17682+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
17683+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
17684+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
17685+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
17686+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
17687+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
17688+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
17689+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
17690+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
17691+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
17692+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
17693+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
17694+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
17695+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
17696+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
17697+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
17698+#define GL_X_EXT 0x87D5
17699+#define GL_Y_EXT 0x87D6
17700+#define GL_Z_EXT 0x87D7
17701+#define GL_W_EXT 0x87D8
17702+#define GL_NEGATIVE_X_EXT 0x87D9
17703+#define GL_NEGATIVE_Y_EXT 0x87DA
17704+#define GL_NEGATIVE_Z_EXT 0x87DB
17705+#define GL_NEGATIVE_W_EXT 0x87DC
17706+#define GL_ZERO_EXT 0x87DD
17707+#define GL_ONE_EXT 0x87DE
17708+#define GL_NEGATIVE_ONE_EXT 0x87DF
17709+#define GL_NORMALIZED_RANGE_EXT 0x87E0
17710+#define GL_FULL_RANGE_EXT 0x87E1
17711+#define GL_CURRENT_VERTEX_EXT 0x87E2
17712+#define GL_MVP_MATRIX_EXT 0x87E3
17713+#define GL_VARIANT_VALUE_EXT 0x87E4
17714+#define GL_VARIANT_DATATYPE_EXT 0x87E5
17715+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
17716+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
17717+#define GL_VARIANT_ARRAY_EXT 0x87E8
17718+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
17719+#define GL_INVARIANT_VALUE_EXT 0x87EA
17720+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
17721+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
17722+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
17723+#endif
17724+
17725+#ifndef GL_ATI_vertex_streams
17726+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
17727+#define GL_VERTEX_STREAM0_ATI 0x876C
17728+#define GL_VERTEX_STREAM1_ATI 0x876D
17729+#define GL_VERTEX_STREAM2_ATI 0x876E
17730+#define GL_VERTEX_STREAM3_ATI 0x876F
17731+#define GL_VERTEX_STREAM4_ATI 0x8770
17732+#define GL_VERTEX_STREAM5_ATI 0x8771
17733+#define GL_VERTEX_STREAM6_ATI 0x8772
17734+#define GL_VERTEX_STREAM7_ATI 0x8773
17735+#define GL_VERTEX_SOURCE_ATI 0x8774
17736+#endif
17737+
17738+#ifndef GL_ATI_element_array
17739+#define GL_ELEMENT_ARRAY_ATI 0x8768
17740+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
17741+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
17742+#endif
17743+
17744+#ifndef GL_SUN_mesh_array
17745+#define GL_QUAD_MESH_SUN 0x8614
17746+#define GL_TRIANGLE_MESH_SUN 0x8615
17747+#endif
17748+
17749+#ifndef GL_SUN_slice_accum
17750+#define GL_SLICE_ACCUM_SUN 0x85CC
17751+#endif
17752+
17753+#ifndef GL_NV_multisample_filter_hint
17754+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
17755+#endif
17756+
17757+#ifndef GL_NV_depth_clamp
17758+#define GL_DEPTH_CLAMP_NV 0x864F
17759+#endif
17760+
17761+#ifndef GL_NV_occlusion_query
17762+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
17763+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
17764+#define GL_PIXEL_COUNT_NV 0x8866
17765+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
17766+#endif
17767+
17768+#ifndef GL_NV_point_sprite
17769+#define GL_POINT_SPRITE_NV 0x8861
17770+#define GL_COORD_REPLACE_NV 0x8862
17771+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
17772+#endif
17773+
17774+#ifndef GL_NV_texture_shader3
17775+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
17776+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
17777+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
17778+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
17779+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
17780+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
17781+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
17782+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
17783+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
17784+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
17785+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
17786+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
17787+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
17788+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
17789+#define GL_HILO8_NV 0x885E
17790+#define GL_SIGNED_HILO8_NV 0x885F
17791+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
17792+#endif
17793+
17794+#ifndef GL_NV_vertex_program1_1
17795+#endif
17796+
17797+#ifndef GL_EXT_shadow_funcs
17798+#endif
17799+
17800+#ifndef GL_EXT_stencil_two_side
17801+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
17802+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
17803+#endif
17804+
17805+#ifndef GL_ATI_text_fragment_shader
17806+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
17807+#endif
17808+
17809+#ifndef GL_APPLE_client_storage
17810+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
17811+#endif
17812+
17813+#ifndef GL_APPLE_element_array
17814+#define GL_ELEMENT_ARRAY_APPLE 0x8768
17815+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
17816+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
17817+#endif
17818+
17819+#ifndef GL_APPLE_fence
17820+#define GL_DRAW_PIXELS_APPLE 0x8A0A
17821+#define GL_FENCE_APPLE 0x8A0B
17822+#endif
17823+
17824+#ifndef GL_APPLE_vertex_array_object
17825+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
17826+#endif
17827+
17828+#ifndef GL_APPLE_vertex_array_range
17829+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
17830+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
17831+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
17832+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
17833+#define GL_STORAGE_CACHED_APPLE 0x85BE
17834+#define GL_STORAGE_SHARED_APPLE 0x85BF
17835+#endif
17836+
17837+#ifndef GL_APPLE_ycbcr_422
17838+#define GL_YCBCR_422_APPLE 0x85B9
17839+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
17840+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
17841+#endif
17842+
17843+#ifndef GL_S3_s3tc
17844+#define GL_RGB_S3TC 0x83A0
17845+#define GL_RGB4_S3TC 0x83A1
17846+#define GL_RGBA_S3TC 0x83A2
17847+#define GL_RGBA4_S3TC 0x83A3
17848+#endif
17849+
17850+#ifndef GL_ATI_draw_buffers
17851+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
17852+#define GL_DRAW_BUFFER0_ATI 0x8825
17853+#define GL_DRAW_BUFFER1_ATI 0x8826
17854+#define GL_DRAW_BUFFER2_ATI 0x8827
17855+#define GL_DRAW_BUFFER3_ATI 0x8828
17856+#define GL_DRAW_BUFFER4_ATI 0x8829
17857+#define GL_DRAW_BUFFER5_ATI 0x882A
17858+#define GL_DRAW_BUFFER6_ATI 0x882B
17859+#define GL_DRAW_BUFFER7_ATI 0x882C
17860+#define GL_DRAW_BUFFER8_ATI 0x882D
17861+#define GL_DRAW_BUFFER9_ATI 0x882E
17862+#define GL_DRAW_BUFFER10_ATI 0x882F
17863+#define GL_DRAW_BUFFER11_ATI 0x8830
17864+#define GL_DRAW_BUFFER12_ATI 0x8831
17865+#define GL_DRAW_BUFFER13_ATI 0x8832
17866+#define GL_DRAW_BUFFER14_ATI 0x8833
17867+#define GL_DRAW_BUFFER15_ATI 0x8834
17868+#endif
17869+
17870+#ifndef GL_ATI_pixel_format_float
17871+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
17872+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
17873+#endif
17874+
17875+#ifndef GL_ATI_texture_env_combine3
17876+#define GL_MODULATE_ADD_ATI 0x8744
17877+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
17878+#define GL_MODULATE_SUBTRACT_ATI 0x8746
17879+#endif
17880+
17881+#ifndef GL_ATI_texture_float
17882+#define GL_RGBA_FLOAT32_ATI 0x8814
17883+#define GL_RGB_FLOAT32_ATI 0x8815
17884+#define GL_ALPHA_FLOAT32_ATI 0x8816
17885+#define GL_INTENSITY_FLOAT32_ATI 0x8817
17886+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
17887+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
17888+#define GL_RGBA_FLOAT16_ATI 0x881A
17889+#define GL_RGB_FLOAT16_ATI 0x881B
17890+#define GL_ALPHA_FLOAT16_ATI 0x881C
17891+#define GL_INTENSITY_FLOAT16_ATI 0x881D
17892+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
17893+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
17894+#endif
17895+
17896+#ifndef GL_NV_float_buffer
17897+#define GL_FLOAT_R_NV 0x8880
17898+#define GL_FLOAT_RG_NV 0x8881
17899+#define GL_FLOAT_RGB_NV 0x8882
17900+#define GL_FLOAT_RGBA_NV 0x8883
17901+#define GL_FLOAT_R16_NV 0x8884
17902+#define GL_FLOAT_R32_NV 0x8885
17903+#define GL_FLOAT_RG16_NV 0x8886
17904+#define GL_FLOAT_RG32_NV 0x8887
17905+#define GL_FLOAT_RGB16_NV 0x8888
17906+#define GL_FLOAT_RGB32_NV 0x8889
17907+#define GL_FLOAT_RGBA16_NV 0x888A
17908+#define GL_FLOAT_RGBA32_NV 0x888B
17909+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
17910+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
17911+#define GL_FLOAT_RGBA_MODE_NV 0x888E
17912+#endif
17913+
17914+#ifndef GL_NV_fragment_program
17915+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
17916+#define GL_FRAGMENT_PROGRAM_NV 0x8870
17917+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
17918+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
17919+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
17920+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
17921+#endif
17922+
17923+#ifndef GL_NV_half_float
17924+#define GL_HALF_FLOAT_NV 0x140B
17925+#endif
17926+
17927+#ifndef GL_NV_pixel_data_range
17928+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17929+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
17930+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
17931+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
17932+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
17933+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
17934+#endif
17935+
17936+#ifndef GL_NV_primitive_restart
17937+#define GL_PRIMITIVE_RESTART_NV 0x8558
17938+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
17939+#endif
17940+
17941+#ifndef GL_NV_texture_expand_normal
17942+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
17943+#endif
17944+
17945+#ifndef GL_NV_vertex_program2
17946+#endif
17947+
17948+#ifndef GL_ATI_map_object_buffer
17949+#endif
17950+
17951+#ifndef GL_ATI_separate_stencil
17952+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
17953+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
17954+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
17955+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
17956+#endif
17957+
17958+#ifndef GL_ATI_vertex_attrib_array_object
17959+#endif
17960+
17961+#ifndef GL_OES_read_format
17962+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
17963+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
17964+#endif
17965+
17966+#ifndef GL_EXT_depth_bounds_test
17967+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
17968+#define GL_DEPTH_BOUNDS_EXT 0x8891
17969+#endif
17970+
17971+#ifndef GL_EXT_texture_mirror_clamp
17972+#define GL_MIRROR_CLAMP_EXT 0x8742
17973+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
17974+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
17975+#endif
17976+
17977+#ifndef GL_EXT_blend_equation_separate
17978+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
17979+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
17980+#endif
17981+
17982+#ifndef GL_MESA_pack_invert
17983+#define GL_PACK_INVERT_MESA 0x8758
17984+#endif
17985+
17986+#ifndef GL_MESA_ycbcr_texture
17987+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
17988+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
17989+#define GL_YCBCR_MESA 0x8757
17990+#endif
17991+
17992+#ifndef GL_EXT_pixel_buffer_object
17993+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
17994+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
17995+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
17996+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
17997+#endif
17998+
17999+#ifndef GL_NV_fragment_program_option
18000+#endif
18001+
18002+#ifndef GL_NV_fragment_program2
18003+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
18004+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
18005+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
18006+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
18007+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
18008+#endif
18009+
18010+#ifndef GL_NV_vertex_program2_option
18011+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
18012+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
18013+#endif
18014+
18015+#ifndef GL_NV_vertex_program3
18016+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
18017+#endif
18018+
18019+#ifndef GL_EXT_framebuffer_object
18020+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
18021+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
18022+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
18023+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
18024+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
18025+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
18026+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
18027+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
18028+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
18029+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
18030+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
18031+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
18032+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
18033+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
18034+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
18035+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
18036+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
18037+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
18038+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
18039+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
18040+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
18041+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
18042+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
18043+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
18044+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
18045+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
18046+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
18047+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
18048+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
18049+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
18050+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
18051+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
18052+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
18053+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
18054+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
18055+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
18056+#define GL_FRAMEBUFFER_EXT 0x8D40
18057+#define GL_RENDERBUFFER_EXT 0x8D41
18058+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
18059+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
18060+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
18061+#define GL_STENCIL_INDEX1_EXT 0x8D46
18062+#define GL_STENCIL_INDEX4_EXT 0x8D47
18063+#define GL_STENCIL_INDEX8_EXT 0x8D48
18064+#define GL_STENCIL_INDEX16_EXT 0x8D49
18065+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
18066+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
18067+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
18068+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
18069+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
18070+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
18071+#endif
18072+
18073+#ifndef GL_GREMEDY_string_marker
18074+#endif
18075+
18076+#ifndef GL_EXT_packed_depth_stencil
18077+#define GL_DEPTH_STENCIL_EXT 0x84F9
18078+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
18079+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
18080+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
18081+#endif
18082+
18083+#ifndef GL_EXT_stencil_clear_tag
18084+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
18085+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
18086+#endif
18087+
18088+#ifndef GL_EXT_texture_sRGB
18089+#define GL_SRGB_EXT 0x8C40
18090+#define GL_SRGB8_EXT 0x8C41
18091+#define GL_SRGB_ALPHA_EXT 0x8C42
18092+#define GL_SRGB8_ALPHA8_EXT 0x8C43
18093+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
18094+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
18095+#define GL_SLUMINANCE_EXT 0x8C46
18096+#define GL_SLUMINANCE8_EXT 0x8C47
18097+#define GL_COMPRESSED_SRGB_EXT 0x8C48
18098+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
18099+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
18100+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
18101+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
18102+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
18103+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
18104+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
18105+#endif
18106+
18107+#ifndef GL_EXT_framebuffer_blit
18108+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
18109+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
18110+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
18111+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
18112+#endif
18113+
18114+#ifndef GL_EXT_framebuffer_multisample
18115+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
18116+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
18117+#define GL_MAX_SAMPLES_EXT 0x8D57
18118+#endif
18119+
18120+#ifndef GL_MESAX_texture_stack
18121+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
18122+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
18123+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
18124+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
18125+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
18126+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
18127+#endif
18128+
18129+#ifndef GL_EXT_timer_query
18130+#define GL_TIME_ELAPSED_EXT 0x88BF
18131+#endif
18132+
18133+#ifndef GL_EXT_gpu_program_parameters
18134+#endif
18135+
18136+#ifndef GL_APPLE_flush_buffer_range
18137+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
18138+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
18139+#endif
18140+
18141+#ifndef GL_NV_gpu_program4
18142+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
18143+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
18144+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
18145+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
18146+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
18147+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
18148+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
18149+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
18150+#endif
18151+
18152+#ifndef GL_NV_geometry_program4
18153+#define GL_LINES_ADJACENCY_EXT 0x000A
18154+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
18155+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
18156+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
18157+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
18158+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
18159+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
18160+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
18161+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
18162+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
18163+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
18164+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
18165+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
18166+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
18167+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
18168+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
18169+#endif
18170+
18171+#ifndef GL_EXT_geometry_shader4
18172+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
18173+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
18174+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
18175+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
18176+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
18177+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
18178+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
18179+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
18180+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
18181+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
18182+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
18183+/* reuse GL_LINES_ADJACENCY_EXT */
18184+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
18185+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
18186+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
18187+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
18188+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
18189+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
18190+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18191+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
18192+#endif
18193+
18194+#ifndef GL_NV_vertex_program4
18195+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
18196+#endif
18197+
18198+#ifndef GL_EXT_gpu_shader4
18199+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
18200+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
18201+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
18202+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
18203+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
18204+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
18205+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
18206+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
18207+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
18208+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
18209+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
18210+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
18211+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
18212+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
18213+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
18214+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
18215+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
18216+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
18217+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
18218+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
18219+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
18220+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
18221+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
18222+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
18223+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
18224+#endif
18225+
18226+#ifndef GL_EXT_draw_instanced
18227+#endif
18228+
18229+#ifndef GL_EXT_packed_float
18230+#define GL_R11F_G11F_B10F_EXT 0x8C3A
18231+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
18232+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
18233+#endif
18234+
18235+#ifndef GL_EXT_texture_array
18236+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
18237+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
18238+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
18239+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
18240+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
18241+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
18242+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
18243+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
18244+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18245+#endif
18246+
18247+#ifndef GL_EXT_texture_buffer_object
18248+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
18249+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
18250+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
18251+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
18252+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
18253+#endif
18254+
18255+#ifndef GL_EXT_texture_compression_latc
18256+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
18257+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
18258+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
18259+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
18260+#endif
18261+
18262+#ifndef GL_EXT_texture_compression_rgtc
18263+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
18264+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
18265+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
18266+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
18267+#endif
18268+
18269+#ifndef GL_EXT_texture_shared_exponent
18270+#define GL_RGB9_E5_EXT 0x8C3D
18271+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
18272+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
18273+#endif
18274+
18275+#ifndef GL_NV_depth_buffer_float
18276+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
18277+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
18278+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
18279+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
18280+#endif
18281+
18282+#ifndef GL_NV_fragment_program4
18283+#endif
18284+
18285+#ifndef GL_NV_framebuffer_multisample_coverage
18286+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
18287+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
18288+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
18289+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
18290+#endif
18291+
18292+#ifndef GL_EXT_framebuffer_sRGB
18293+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
18294+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
18295+#endif
18296+
18297+#ifndef GL_NV_geometry_shader4
18298+#endif
18299+
18300+#ifndef GL_NV_parameter_buffer_object
18301+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
18302+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
18303+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
18304+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
18305+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
18306+#endif
18307+
18308+#ifndef GL_EXT_draw_buffers2
18309+#endif
18310+
18311+#ifndef GL_NV_transform_feedback
18312+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
18313+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
18314+#define GL_TEXTURE_COORD_NV 0x8C79
18315+#define GL_CLIP_DISTANCE_NV 0x8C7A
18316+#define GL_VERTEX_ID_NV 0x8C7B
18317+#define GL_PRIMITIVE_ID_NV 0x8C7C
18318+#define GL_GENERIC_ATTRIB_NV 0x8C7D
18319+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
18320+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
18321+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
18322+#define GL_ACTIVE_VARYINGS_NV 0x8C81
18323+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
18324+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
18325+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
18326+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
18327+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
18328+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
18329+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
18330+#define GL_RASTERIZER_DISCARD_NV 0x8C89
18331+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
18332+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
18333+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
18334+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
18335+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
18336+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
18337+#endif
18338+
18339+#ifndef GL_EXT_bindable_uniform
18340+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
18341+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
18342+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
18343+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
18344+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
18345+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
18346+#endif
18347+
18348+#ifndef GL_EXT_texture_integer
18349+#define GL_RGBA32UI_EXT 0x8D70
18350+#define GL_RGB32UI_EXT 0x8D71
18351+#define GL_ALPHA32UI_EXT 0x8D72
18352+#define GL_INTENSITY32UI_EXT 0x8D73
18353+#define GL_LUMINANCE32UI_EXT 0x8D74
18354+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
18355+#define GL_RGBA16UI_EXT 0x8D76
18356+#define GL_RGB16UI_EXT 0x8D77
18357+#define GL_ALPHA16UI_EXT 0x8D78
18358+#define GL_INTENSITY16UI_EXT 0x8D79
18359+#define GL_LUMINANCE16UI_EXT 0x8D7A
18360+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
18361+#define GL_RGBA8UI_EXT 0x8D7C
18362+#define GL_RGB8UI_EXT 0x8D7D
18363+#define GL_ALPHA8UI_EXT 0x8D7E
18364+#define GL_INTENSITY8UI_EXT 0x8D7F
18365+#define GL_LUMINANCE8UI_EXT 0x8D80
18366+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
18367+#define GL_RGBA32I_EXT 0x8D82
18368+#define GL_RGB32I_EXT 0x8D83
18369+#define GL_ALPHA32I_EXT 0x8D84
18370+#define GL_INTENSITY32I_EXT 0x8D85
18371+#define GL_LUMINANCE32I_EXT 0x8D86
18372+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
18373+#define GL_RGBA16I_EXT 0x8D88
18374+#define GL_RGB16I_EXT 0x8D89
18375+#define GL_ALPHA16I_EXT 0x8D8A
18376+#define GL_INTENSITY16I_EXT 0x8D8B
18377+#define GL_LUMINANCE16I_EXT 0x8D8C
18378+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
18379+#define GL_RGBA8I_EXT 0x8D8E
18380+#define GL_RGB8I_EXT 0x8D8F
18381+#define GL_ALPHA8I_EXT 0x8D90
18382+#define GL_INTENSITY8I_EXT 0x8D91
18383+#define GL_LUMINANCE8I_EXT 0x8D92
18384+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
18385+#define GL_RED_INTEGER_EXT 0x8D94
18386+#define GL_GREEN_INTEGER_EXT 0x8D95
18387+#define GL_BLUE_INTEGER_EXT 0x8D96
18388+#define GL_ALPHA_INTEGER_EXT 0x8D97
18389+#define GL_RGB_INTEGER_EXT 0x8D98
18390+#define GL_RGBA_INTEGER_EXT 0x8D99
18391+#define GL_BGR_INTEGER_EXT 0x8D9A
18392+#define GL_BGRA_INTEGER_EXT 0x8D9B
18393+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
18394+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
18395+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
18396+#endif
18397+
18398+
18399+/*************************************************************/
18400+
18401+#include <stddef.h>
18402+#ifndef GL_VERSION_2_0
18403+/* GL type for program/shader text */
18404+typedef char GLchar; /* native character */
18405+#endif
18406+
18407+#ifndef GL_VERSION_1_5
18408+/* GL types for handling large vertex buffer objects */
18409+typedef ptrdiff_t GLintptr;
18410+typedef ptrdiff_t GLsizeiptr;
18411+#endif
18412+
18413+#ifndef GL_ARB_vertex_buffer_object
18414+/* GL types for handling large vertex buffer objects */
18415+typedef ptrdiff_t GLintptrARB;
18416+typedef ptrdiff_t GLsizeiptrARB;
18417+#endif
18418+
18419+#ifndef GL_ARB_shader_objects
18420+/* GL types for handling shader object handles and program/shader text */
18421+typedef char GLcharARB; /* native character */
18422+typedef unsigned int GLhandleARB; /* shader object handle */
18423+#endif
18424+
18425+/* GL types for "half" precision (s10e5) float data in host memory */
18426+#ifndef GL_ARB_half_float_pixel
18427+typedef unsigned short GLhalfARB;
18428+#endif
18429+
18430+#ifndef GL_NV_half_float
18431+typedef unsigned short GLhalfNV;
18432+#endif
18433+
18434+#ifndef GLEXT_64_TYPES_DEFINED
18435+/* This code block is duplicated in glext.h, so must be protected */
18436+#define GLEXT_64_TYPES_DEFINED
18437+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
18438+/* (as used in the GL_EXT_timer_query extension). */
18439+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
18440+#include <inttypes.h>
18441+#elif defined(__sun__)
18442+#include <inttypes.h>
18443+#if defined(__STDC__)
18444+#if defined(__arch64__)
18445+typedef long int int64_t;
18446+typedef unsigned long int uint64_t;
18447+#else
18448+typedef long long int int64_t;
18449+typedef unsigned long long int uint64_t;
18450+#endif /* __arch64__ */
18451+#endif /* __STDC__ */
18452+#elif defined( __VMS )
18453+#include <inttypes.h>
18454+#elif defined(__SCO__) || defined(__USLC__)
18455+#include <stdint.h>
18456+#elif defined(__UNIXOS2__) || defined(__SOL64__)
18457+typedef long int int32_t;
18458+typedef long long int int64_t;
18459+typedef unsigned long long int uint64_t;
18460+#elif defined(_WIN32) && defined(__GNUC__)
18461+#include <stdint.h>
18462+#elif defined(_WIN32)
18463+typedef __int32 int32_t;
18464+typedef __int64 int64_t;
18465+typedef unsigned __int64 uint64_t;
18466+#else
18467+#include <inttypes.h> /* Fallback option */
18468+#endif
18469+#endif
18470+
18471+#ifndef GL_EXT_timer_query
18472+typedef int64_t GLint64EXT;
18473+typedef uint64_t GLuint64EXT;
18474+#endif
18475+
18476+#ifndef GL_VERSION_1_2
18477+#define GL_VERSION_1_2 1
18478+#ifdef GL_GLEXT_PROTOTYPES
18479+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
18480+GLAPI void APIENTRY glBlendEquation (GLenum);
18481+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
18482+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18483+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
18484+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
18485+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
18486+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
18487+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
18488+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
18489+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18490+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
18491+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18492+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18493+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
18494+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
18495+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
18496+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
18497+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
18498+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
18499+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
18500+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
18501+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
18502+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
18503+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
18504+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18505+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
18506+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
18507+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18508+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
18509+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
18510+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
18511+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
18512+GLAPI void APIENTRY glResetHistogram (GLenum);
18513+GLAPI void APIENTRY glResetMinmax (GLenum);
18514+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
18515+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18516+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
18517+#endif /* GL_GLEXT_PROTOTYPES */
18518+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
18519+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
18520+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
18521+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
18522+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18523+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18524+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18525+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
18526+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18527+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18528+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
18529+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
18530+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
18531+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
18532+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
18533+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18534+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
18535+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18536+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18537+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
18538+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
18539+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18540+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18541+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
18542+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
18543+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18544+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18545+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18546+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18547+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18548+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18549+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
18550+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
18551+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
18552+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
18553+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);
18554+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);
18555+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
18556+#endif
18557+
18558+#ifndef GL_VERSION_1_3
18559+#define GL_VERSION_1_3 1
18560+#ifdef GL_GLEXT_PROTOTYPES
18561+GLAPI void APIENTRY glActiveTexture (GLenum);
18562+GLAPI void APIENTRY glClientActiveTexture (GLenum);
18563+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
18564+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
18565+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
18566+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
18567+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
18568+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
18569+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
18570+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
18571+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
18572+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
18573+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
18574+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
18575+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
18576+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
18577+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
18578+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
18579+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
18580+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
18581+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
18582+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
18583+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
18584+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
18585+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
18586+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
18587+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18588+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
18589+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18590+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
18591+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
18592+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
18593+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
18594+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
18595+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
18596+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
18597+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
18598+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
18599+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
18600+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18601+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18602+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18603+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18604+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18605+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18606+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
18607+#endif /* GL_GLEXT_PROTOTYPES */
18608+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
18609+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
18610+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
18611+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
18612+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
18613+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
18614+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
18615+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
18616+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
18617+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
18618+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
18619+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
18620+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
18621+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
18622+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
18623+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
18624+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
18625+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
18626+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18627+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
18628+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18629+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
18630+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
18631+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
18632+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18633+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
18634+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18635+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
18636+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18637+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
18638+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18639+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
18640+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18641+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
18642+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18643+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18644+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18645+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18646+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
18647+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18648+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18649+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18650+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);
18651+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18652+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18653+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
18654+#endif
18655+
18656+#ifndef GL_VERSION_1_4
18657+#define GL_VERSION_1_4 1
18658+#ifdef GL_GLEXT_PROTOTYPES
18659+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
18660+GLAPI void APIENTRY glFogCoordf (GLfloat);
18661+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
18662+GLAPI void APIENTRY glFogCoordd (GLdouble);
18663+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
18664+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
18665+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
18666+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
18667+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
18668+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
18669+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
18670+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
18671+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
18672+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
18673+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
18674+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
18675+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
18676+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
18677+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
18678+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
18679+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
18680+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
18681+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
18682+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
18683+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
18684+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
18685+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
18686+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
18687+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
18688+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
18689+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
18690+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
18691+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
18692+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
18693+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
18694+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
18695+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
18696+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
18697+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
18698+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
18699+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
18700+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
18701+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
18702+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
18703+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
18704+#endif /* GL_GLEXT_PROTOTYPES */
18705+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
18706+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
18707+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
18708+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
18709+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
18710+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
18711+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
18712+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
18713+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
18714+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
18715+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
18716+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
18717+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
18718+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
18719+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
18720+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
18721+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
18722+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
18723+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
18724+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
18725+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
18726+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
18727+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
18728+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
18729+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
18730+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
18731+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
18732+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
18733+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18734+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
18735+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
18736+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
18737+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
18738+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
18739+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
18740+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
18741+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
18742+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
18743+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
18744+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
18745+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
18746+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
18747+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
18748+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
18749+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
18750+#endif
18751+
18752+#ifndef GL_VERSION_1_5
18753+#define GL_VERSION_1_5 1
18754+#ifdef GL_GLEXT_PROTOTYPES
18755+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
18756+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
18757+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
18758+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
18759+GLAPI void APIENTRY glEndQuery (GLenum);
18760+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
18761+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
18762+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
18763+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
18764+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
18765+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
18766+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
18767+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
18768+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
18769+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
18770+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
18771+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
18772+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
18773+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
18774+#endif /* GL_GLEXT_PROTOTYPES */
18775+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
18776+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
18777+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
18778+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
18779+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
18780+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
18781+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
18782+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
18783+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
18784+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
18785+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
18786+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
18787+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
18788+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
18789+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
18790+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
18791+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
18792+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18793+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
18794+#endif
18795+
18796+#ifndef GL_VERSION_2_0
18797+#define GL_VERSION_2_0 1
18798+#ifdef GL_GLEXT_PROTOTYPES
18799+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
18800+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
18801+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
18802+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
18803+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
18804+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
18805+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
18806+GLAPI void APIENTRY glCompileShader (GLuint);
18807+GLAPI GLuint APIENTRY glCreateProgram (void);
18808+GLAPI GLuint APIENTRY glCreateShader (GLenum);
18809+GLAPI void APIENTRY glDeleteProgram (GLuint);
18810+GLAPI void APIENTRY glDeleteShader (GLuint);
18811+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
18812+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
18813+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
18814+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18815+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18816+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
18817+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
18818+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
18819+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18820+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
18821+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18822+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
18823+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
18824+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
18825+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
18826+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
18827+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
18828+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
18829+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
18830+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
18831+GLAPI GLboolean APIENTRY glIsShader (GLuint);
18832+GLAPI void APIENTRY glLinkProgram (GLuint);
18833+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
18834+GLAPI void APIENTRY glUseProgram (GLuint);
18835+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
18836+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
18837+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
18838+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18839+GLAPI void APIENTRY glUniform1i (GLint, GLint);
18840+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
18841+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
18842+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
18843+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
18844+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
18845+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
18846+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
18847+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
18848+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
18849+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
18850+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
18851+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18852+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18853+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18854+GLAPI void APIENTRY glValidateProgram (GLuint);
18855+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
18856+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
18857+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
18858+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
18859+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
18860+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
18861+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
18862+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
18863+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
18864+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
18865+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
18866+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
18867+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
18868+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
18869+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
18870+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
18871+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
18872+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
18873+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
18874+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
18875+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
18876+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18877+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
18878+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
18879+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
18880+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
18881+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18882+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
18883+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18884+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
18885+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
18886+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
18887+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
18888+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
18889+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
18890+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
18891+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18892+#endif /* GL_GLEXT_PROTOTYPES */
18893+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
18894+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
18895+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
18896+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
18897+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
18898+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
18899+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
18900+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
18901+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
18902+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
18903+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
18904+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
18905+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
18906+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18907+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18908+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18909+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18910+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
18911+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
18912+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
18913+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18914+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
18915+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18916+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
18917+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
18918+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
18919+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
18920+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
18921+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
18922+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
18923+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18924+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
18925+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
18926+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
18927+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
18928+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
18929+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
18930+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
18931+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18932+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18933+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
18934+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
18935+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18936+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18937+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18938+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18939+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18940+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18941+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
18942+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
18943+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
18944+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
18945+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18946+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18947+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18948+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
18949+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
18950+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
18951+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
18952+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
18953+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
18954+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
18955+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
18956+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
18957+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
18958+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
18959+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
18960+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
18961+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18962+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
18963+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18964+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
18965+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18966+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
18967+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
18968+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
18969+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
18970+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18971+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
18972+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
18973+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
18974+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
18975+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18976+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
18977+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18978+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
18979+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
18980+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18981+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
18982+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
18983+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
18984+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
18985+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18986+#endif
18987+
18988+#ifndef GL_VERSION_2_1
18989+#define GL_VERSION_2_1 1
18990+#ifdef GL_GLEXT_PROTOTYPES
18991+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18992+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18993+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18994+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18995+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18996+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18997+#endif /* GL_GLEXT_PROTOTYPES */
18998+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18999+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19000+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19001+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19002+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19003+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19004+#endif
19005+
19006+#ifndef GL_ARB_multitexture
19007+#define GL_ARB_multitexture 1
19008+#ifdef GL_GLEXT_PROTOTYPES
19009+GLAPI void APIENTRY glActiveTextureARB (GLenum);
19010+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
19011+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
19012+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
19013+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
19014+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
19015+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
19016+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
19017+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
19018+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
19019+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
19020+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
19021+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
19022+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
19023+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
19024+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
19025+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
19026+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
19027+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
19028+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
19029+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
19030+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
19031+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
19032+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
19033+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
19034+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
19035+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
19036+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
19037+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
19038+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
19039+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
19040+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
19041+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
19042+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
19043+#endif /* GL_GLEXT_PROTOTYPES */
19044+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
19045+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
19046+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
19047+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
19048+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
19049+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
19050+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
19051+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
19052+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
19053+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
19054+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
19055+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
19056+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
19057+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
19058+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
19059+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
19060+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
19061+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
19062+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
19063+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
19064+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
19065+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
19066+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
19067+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
19068+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
19069+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
19070+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
19071+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
19072+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
19073+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
19074+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
19075+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
19076+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
19077+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
19078+#endif
19079+
19080+#ifndef GL_ARB_transpose_matrix
19081+#define GL_ARB_transpose_matrix 1
19082+#ifdef GL_GLEXT_PROTOTYPES
19083+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
19084+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
19085+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
19086+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
19087+#endif /* GL_GLEXT_PROTOTYPES */
19088+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
19089+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
19090+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
19091+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
19092+#endif
19093+
19094+#ifndef GL_ARB_multisample
19095+#define GL_ARB_multisample 1
19096+#ifdef GL_GLEXT_PROTOTYPES
19097+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
19098+#endif /* GL_GLEXT_PROTOTYPES */
19099+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
19100+#endif
19101+
19102+#ifndef GL_ARB_texture_env_add
19103+#define GL_ARB_texture_env_add 1
19104+#endif
19105+
19106+#ifndef GL_ARB_texture_cube_map
19107+#define GL_ARB_texture_cube_map 1
19108+#endif
19109+
19110+#ifndef GL_ARB_texture_compression
19111+#define GL_ARB_texture_compression 1
19112+#ifdef GL_GLEXT_PROTOTYPES
19113+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
19114+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
19115+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
19116+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
19117+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
19118+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
19119+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
19120+#endif /* GL_GLEXT_PROTOTYPES */
19121+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
19122+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
19123+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
19124+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);
19125+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
19126+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
19127+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
19128+#endif
19129+
19130+#ifndef GL_ARB_texture_border_clamp
19131+#define GL_ARB_texture_border_clamp 1
19132+#endif
19133+
19134+#ifndef GL_ARB_point_parameters
19135+#define GL_ARB_point_parameters 1
19136+#ifdef GL_GLEXT_PROTOTYPES
19137+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
19138+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
19139+#endif /* GL_GLEXT_PROTOTYPES */
19140+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
19141+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
19142+#endif
19143+
19144+#ifndef GL_ARB_vertex_blend
19145+#define GL_ARB_vertex_blend 1
19146+#ifdef GL_GLEXT_PROTOTYPES
19147+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
19148+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
19149+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
19150+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
19151+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
19152+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
19153+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
19154+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
19155+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
19156+GLAPI void APIENTRY glVertexBlendARB (GLint);
19157+#endif /* GL_GLEXT_PROTOTYPES */
19158+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
19159+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
19160+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
19161+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
19162+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
19163+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
19164+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
19165+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
19166+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19167+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
19168+#endif
19169+
19170+#ifndef GL_ARB_matrix_palette
19171+#define GL_ARB_matrix_palette 1
19172+#ifdef GL_GLEXT_PROTOTYPES
19173+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
19174+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
19175+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
19176+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
19177+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
19178+#endif /* GL_GLEXT_PROTOTYPES */
19179+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
19180+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
19181+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
19182+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
19183+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19184+#endif
19185+
19186+#ifndef GL_ARB_texture_env_combine
19187+#define GL_ARB_texture_env_combine 1
19188+#endif
19189+
19190+#ifndef GL_ARB_texture_env_crossbar
19191+#define GL_ARB_texture_env_crossbar 1
19192+#endif
19193+
19194+#ifndef GL_ARB_texture_env_dot3
19195+#define GL_ARB_texture_env_dot3 1
19196+#endif
19197+
19198+#ifndef GL_ARB_texture_mirrored_repeat
19199+#define GL_ARB_texture_mirrored_repeat 1
19200+#endif
19201+
19202+#ifndef GL_ARB_depth_texture
19203+#define GL_ARB_depth_texture 1
19204+#endif
19205+
19206+#ifndef GL_ARB_shadow
19207+#define GL_ARB_shadow 1
19208+#endif
19209+
19210+#ifndef GL_ARB_shadow_ambient
19211+#define GL_ARB_shadow_ambient 1
19212+#endif
19213+
19214+#ifndef GL_ARB_window_pos
19215+#define GL_ARB_window_pos 1
19216+#ifdef GL_GLEXT_PROTOTYPES
19217+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
19218+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
19219+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
19220+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
19221+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
19222+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
19223+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
19224+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
19225+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
19226+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
19227+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
19228+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
19229+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
19230+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
19231+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
19232+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
19233+#endif /* GL_GLEXT_PROTOTYPES */
19234+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
19235+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
19236+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
19237+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
19238+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
19239+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
19240+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
19241+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
19242+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
19243+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
19244+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
19245+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
19246+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
19247+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
19248+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
19249+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
19250+#endif
19251+
19252+#ifndef GL_ARB_vertex_program
19253+#define GL_ARB_vertex_program 1
19254+#ifdef GL_GLEXT_PROTOTYPES
19255+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
19256+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
19257+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
19258+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
19259+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
19260+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
19261+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
19262+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
19263+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
19264+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
19265+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
19266+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
19267+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
19268+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
19269+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
19270+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
19271+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
19272+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
19273+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
19274+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
19275+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
19276+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
19277+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
19278+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
19279+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
19280+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
19281+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19282+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
19283+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19284+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
19285+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
19286+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
19287+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
19288+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
19289+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
19290+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
19291+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
19292+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
19293+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
19294+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
19295+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
19296+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
19297+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
19298+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19299+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
19300+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19301+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
19302+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19303+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
19304+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19305+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
19306+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
19307+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
19308+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
19309+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
19310+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
19311+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
19312+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
19313+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
19314+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
19315+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
19316+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
19317+#endif /* GL_GLEXT_PROTOTYPES */
19318+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
19319+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
19320+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
19321+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
19322+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
19323+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
19324+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
19325+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
19326+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
19327+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
19328+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
19329+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
19330+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
19331+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
19332+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
19333+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
19334+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
19335+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
19336+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
19337+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
19338+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
19339+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
19340+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
19341+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
19342+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
19343+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
19344+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19345+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
19346+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19347+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
19348+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
19349+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
19350+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
19351+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
19352+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
19353+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
19354+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
19355+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19356+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19357+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
19358+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
19359+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
19360+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
19361+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19362+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19363+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19364+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19365+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19366+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19367+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19368+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19369+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19370+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19371+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19372+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19373+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19374+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
19375+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
19376+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
19377+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
19378+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
19379+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
19380+#endif
19381+
19382+#ifndef GL_ARB_fragment_program
19383+#define GL_ARB_fragment_program 1
19384+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
19385+#endif
19386+
19387+#ifndef GL_ARB_vertex_buffer_object
19388+#define GL_ARB_vertex_buffer_object 1
19389+#ifdef GL_GLEXT_PROTOTYPES
19390+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
19391+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
19392+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
19393+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
19394+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
19395+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
19396+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
19397+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
19398+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
19399+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
19400+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
19401+#endif /* GL_GLEXT_PROTOTYPES */
19402+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
19403+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
19404+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
19405+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
19406+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
19407+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
19408+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
19409+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
19410+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
19411+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19412+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
19413+#endif
19414+
19415+#ifndef GL_ARB_occlusion_query
19416+#define GL_ARB_occlusion_query 1
19417+#ifdef GL_GLEXT_PROTOTYPES
19418+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
19419+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
19420+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
19421+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
19422+GLAPI void APIENTRY glEndQueryARB (GLenum);
19423+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
19424+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
19425+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
19426+#endif /* GL_GLEXT_PROTOTYPES */
19427+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
19428+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
19429+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
19430+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
19431+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
19432+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19433+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
19434+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
19435+#endif
19436+
19437+#ifndef GL_ARB_shader_objects
19438+#define GL_ARB_shader_objects 1
19439+#ifdef GL_GLEXT_PROTOTYPES
19440+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
19441+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
19442+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
19443+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
19444+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
19445+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
19446+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
19447+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
19448+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
19449+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
19450+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
19451+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
19452+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
19453+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
19454+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
19455+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
19456+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
19457+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
19458+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
19459+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
19460+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
19461+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
19462+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
19463+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
19464+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
19465+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
19466+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
19467+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19468+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19469+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19470+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
19471+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
19472+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19473+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
19474+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
19475+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19476+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
19477+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
19478+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19479+#endif /* GL_GLEXT_PROTOTYPES */
19480+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
19481+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
19482+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
19483+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
19484+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
19485+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
19486+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
19487+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
19488+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
19489+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
19490+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
19491+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
19492+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
19493+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
19494+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
19495+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
19496+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
19497+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
19498+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
19499+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19500+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19501+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19502+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19503+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19504+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19505+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19506+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19507+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19508+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19509+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19510+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
19511+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
19512+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
19513+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
19514+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19515+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19516+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
19517+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
19518+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
19519+#endif
19520+
19521+#ifndef GL_ARB_vertex_shader
19522+#define GL_ARB_vertex_shader 1
19523+#ifdef GL_GLEXT_PROTOTYPES
19524+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
19525+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19526+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
19527+#endif /* GL_GLEXT_PROTOTYPES */
19528+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
19529+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19530+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19531+#endif
19532+
19533+#ifndef GL_ARB_fragment_shader
19534+#define GL_ARB_fragment_shader 1
19535+#endif
19536+
19537+#ifndef GL_ARB_shading_language_100
19538+#define GL_ARB_shading_language_100 1
19539+#endif
19540+
19541+#ifndef GL_ARB_texture_non_power_of_two
19542+#define GL_ARB_texture_non_power_of_two 1
19543+#endif
19544+
19545+#ifndef GL_ARB_point_sprite
19546+#define GL_ARB_point_sprite 1
19547+#endif
19548+
19549+#ifndef GL_ARB_fragment_program_shadow
19550+#define GL_ARB_fragment_program_shadow 1
19551+#endif
19552+
19553+#ifndef GL_ARB_draw_buffers
19554+#define GL_ARB_draw_buffers 1
19555+#ifdef GL_GLEXT_PROTOTYPES
19556+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
19557+#endif /* GL_GLEXT_PROTOTYPES */
19558+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
19559+#endif
19560+
19561+#ifndef GL_ARB_texture_rectangle
19562+#define GL_ARB_texture_rectangle 1
19563+#endif
19564+
19565+#ifndef GL_ARB_color_buffer_float
19566+#define GL_ARB_color_buffer_float 1
19567+#ifdef GL_GLEXT_PROTOTYPES
19568+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
19569+#endif /* GL_GLEXT_PROTOTYPES */
19570+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
19571+#endif
19572+
19573+#ifndef GL_ARB_half_float_pixel
19574+#define GL_ARB_half_float_pixel 1
19575+#endif
19576+
19577+#ifndef GL_ARB_texture_float
19578+#define GL_ARB_texture_float 1
19579+#endif
19580+
19581+#ifndef GL_ARB_pixel_buffer_object
19582+#define GL_ARB_pixel_buffer_object 1
19583+#endif
19584+
19585+#ifndef GL_EXT_abgr
19586+#define GL_EXT_abgr 1
19587+#endif
19588+
19589+#ifndef GL_EXT_blend_color
19590+#define GL_EXT_blend_color 1
19591+#ifdef GL_GLEXT_PROTOTYPES
19592+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
19593+#endif /* GL_GLEXT_PROTOTYPES */
19594+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
19595+#endif
19596+
19597+#ifndef GL_EXT_polygon_offset
19598+#define GL_EXT_polygon_offset 1
19599+#ifdef GL_GLEXT_PROTOTYPES
19600+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
19601+#endif /* GL_GLEXT_PROTOTYPES */
19602+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
19603+#endif
19604+
19605+#ifndef GL_EXT_texture
19606+#define GL_EXT_texture 1
19607+#endif
19608+
19609+#ifndef GL_EXT_texture3D
19610+#define GL_EXT_texture3D 1
19611+#ifdef GL_GLEXT_PROTOTYPES
19612+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19613+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19614+#endif /* GL_GLEXT_PROTOTYPES */
19615+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);
19616+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);
19617+#endif
19618+
19619+#ifndef GL_SGIS_texture_filter4
19620+#define GL_SGIS_texture_filter4 1
19621+#ifdef GL_GLEXT_PROTOTYPES
19622+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
19623+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
19624+#endif /* GL_GLEXT_PROTOTYPES */
19625+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
19626+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
19627+#endif
19628+
19629+#ifndef GL_EXT_subtexture
19630+#define GL_EXT_subtexture 1
19631+#ifdef GL_GLEXT_PROTOTYPES
19632+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
19633+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19634+#endif /* GL_GLEXT_PROTOTYPES */
19635+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
19636+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
19637+#endif
19638+
19639+#ifndef GL_EXT_copy_texture
19640+#define GL_EXT_copy_texture 1
19641+#ifdef GL_GLEXT_PROTOTYPES
19642+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
19643+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
19644+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
19645+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19646+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19647+#endif /* GL_GLEXT_PROTOTYPES */
19648+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
19649+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
19650+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
19651+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19652+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19653+#endif
19654+
19655+#ifndef GL_EXT_histogram
19656+#define GL_EXT_histogram 1
19657+#ifdef GL_GLEXT_PROTOTYPES
19658+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19659+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
19660+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
19661+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19662+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
19663+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
19664+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
19665+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
19666+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
19667+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
19668+#endif /* GL_GLEXT_PROTOTYPES */
19669+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19670+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19671+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19672+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19673+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19674+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19675+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
19676+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
19677+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
19678+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
19679+#endif
19680+
19681+#ifndef GL_EXT_convolution
19682+#define GL_EXT_convolution 1
19683+#ifdef GL_GLEXT_PROTOTYPES
19684+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19685+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19686+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
19687+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
19688+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
19689+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
19690+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
19691+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
19692+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
19693+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
19694+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
19695+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
19696+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
19697+#endif /* GL_GLEXT_PROTOTYPES */
19698+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
19699+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
19700+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
19701+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19702+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
19703+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19704+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19705+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
19706+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
19707+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19708+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19709+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
19710+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
19711+#endif
19712+
19713+#ifndef GL_SGI_color_matrix
19714+#define GL_SGI_color_matrix 1
19715+#endif
19716+
19717+#ifndef GL_SGI_color_table
19718+#define GL_SGI_color_table 1
19719+#ifdef GL_GLEXT_PROTOTYPES
19720+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19721+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
19722+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
19723+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
19724+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
19725+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
19726+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
19727+#endif /* GL_GLEXT_PROTOTYPES */
19728+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19729+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
19730+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
19731+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19732+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
19733+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
19734+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
19735+#endif
19736+
19737+#ifndef GL_SGIX_pixel_texture
19738+#define GL_SGIX_pixel_texture 1
19739+#ifdef GL_GLEXT_PROTOTYPES
19740+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
19741+#endif /* GL_GLEXT_PROTOTYPES */
19742+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
19743+#endif
19744+
19745+#ifndef GL_SGIS_pixel_texture
19746+#define GL_SGIS_pixel_texture 1
19747+#ifdef GL_GLEXT_PROTOTYPES
19748+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
19749+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
19750+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
19751+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
19752+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
19753+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
19754+#endif /* GL_GLEXT_PROTOTYPES */
19755+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
19756+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
19757+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19758+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19759+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
19760+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
19761+#endif
19762+
19763+#ifndef GL_SGIS_texture4D
19764+#define GL_SGIS_texture4D 1
19765+#ifdef GL_GLEXT_PROTOTYPES
19766+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19767+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19768+#endif /* GL_GLEXT_PROTOTYPES */
19769+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);
19770+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);
19771+#endif
19772+
19773+#ifndef GL_SGI_texture_color_table
19774+#define GL_SGI_texture_color_table 1
19775+#endif
19776+
19777+#ifndef GL_EXT_cmyka
19778+#define GL_EXT_cmyka 1
19779+#endif
19780+
19781+#ifndef GL_EXT_texture_object
19782+#define GL_EXT_texture_object 1
19783+#ifdef GL_GLEXT_PROTOTYPES
19784+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
19785+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
19786+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
19787+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
19788+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
19789+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
19790+#endif /* GL_GLEXT_PROTOTYPES */
19791+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
19792+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
19793+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
19794+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
19795+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
19796+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
19797+#endif
19798+
19799+#ifndef GL_SGIS_detail_texture
19800+#define GL_SGIS_detail_texture 1
19801+#ifdef GL_GLEXT_PROTOTYPES
19802+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19803+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
19804+#endif /* GL_GLEXT_PROTOTYPES */
19805+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19806+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19807+#endif
19808+
19809+#ifndef GL_SGIS_sharpen_texture
19810+#define GL_SGIS_sharpen_texture 1
19811+#ifdef GL_GLEXT_PROTOTYPES
19812+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19813+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
19814+#endif /* GL_GLEXT_PROTOTYPES */
19815+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19816+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19817+#endif
19818+
19819+#ifndef GL_EXT_packed_pixels
19820+#define GL_EXT_packed_pixels 1
19821+#endif
19822+
19823+#ifndef GL_SGIS_texture_lod
19824+#define GL_SGIS_texture_lod 1
19825+#endif
19826+
19827+#ifndef GL_SGIS_multisample
19828+#define GL_SGIS_multisample 1
19829+#ifdef GL_GLEXT_PROTOTYPES
19830+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
19831+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
19832+#endif /* GL_GLEXT_PROTOTYPES */
19833+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
19834+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
19835+#endif
19836+
19837+#ifndef GL_EXT_rescale_normal
19838+#define GL_EXT_rescale_normal 1
19839+#endif
19840+
19841+#ifndef GL_EXT_vertex_array
19842+#define GL_EXT_vertex_array 1
19843+#ifdef GL_GLEXT_PROTOTYPES
19844+GLAPI void APIENTRY glArrayElementEXT (GLint);
19845+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19846+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
19847+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
19848+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
19849+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19850+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19851+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19852+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19853+#endif /* GL_GLEXT_PROTOTYPES */
19854+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
19855+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19856+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
19857+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
19858+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
19859+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19860+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19861+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19862+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19863+#endif
19864+
19865+#ifndef GL_EXT_misc_attribute
19866+#define GL_EXT_misc_attribute 1
19867+#endif
19868+
19869+#ifndef GL_SGIS_generate_mipmap
19870+#define GL_SGIS_generate_mipmap 1
19871+#endif
19872+
19873+#ifndef GL_SGIX_clipmap
19874+#define GL_SGIX_clipmap 1
19875+#endif
19876+
19877+#ifndef GL_SGIX_shadow
19878+#define GL_SGIX_shadow 1
19879+#endif
19880+
19881+#ifndef GL_SGIS_texture_edge_clamp
19882+#define GL_SGIS_texture_edge_clamp 1
19883+#endif
19884+
19885+#ifndef GL_SGIS_texture_border_clamp
19886+#define GL_SGIS_texture_border_clamp 1
19887+#endif
19888+
19889+#ifndef GL_EXT_blend_minmax
19890+#define GL_EXT_blend_minmax 1
19891+#ifdef GL_GLEXT_PROTOTYPES
19892+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
19893+#endif /* GL_GLEXT_PROTOTYPES */
19894+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
19895+#endif
19896+
19897+#ifndef GL_EXT_blend_subtract
19898+#define GL_EXT_blend_subtract 1
19899+#endif
19900+
19901+#ifndef GL_EXT_blend_logic_op
19902+#define GL_EXT_blend_logic_op 1
19903+#endif
19904+
19905+#ifndef GL_SGIX_interlace
19906+#define GL_SGIX_interlace 1
19907+#endif
19908+
19909+#ifndef GL_SGIX_pixel_tiles
19910+#define GL_SGIX_pixel_tiles 1
19911+#endif
19912+
19913+#ifndef GL_SGIX_texture_select
19914+#define GL_SGIX_texture_select 1
19915+#endif
19916+
19917+#ifndef GL_SGIX_sprite
19918+#define GL_SGIX_sprite 1
19919+#ifdef GL_GLEXT_PROTOTYPES
19920+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
19921+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
19922+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
19923+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
19924+#endif /* GL_GLEXT_PROTOTYPES */
19925+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
19926+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
19927+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
19928+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
19929+#endif
19930+
19931+#ifndef GL_SGIX_texture_multi_buffer
19932+#define GL_SGIX_texture_multi_buffer 1
19933+#endif
19934+
19935+#ifndef GL_EXT_point_parameters
19936+#define GL_EXT_point_parameters 1
19937+#ifdef GL_GLEXT_PROTOTYPES
19938+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
19939+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
19940+/* ERO Begin */
19941+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
19942+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
19943+/* ERO end */
19944+#endif /* GL_GLEXT_PROTOTYPES */
19945+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
19946+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
19947+#endif
19948+
19949+#ifndef GL_SGIS_point_parameters
19950+#define GL_SGIS_point_parameters 1
19951+#ifdef GL_GLEXT_PROTOTYPES
19952+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
19953+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
19954+#endif /* GL_GLEXT_PROTOTYPES */
19955+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19956+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19957+#endif
19958+
19959+#ifndef GL_SGIX_instruments
19960+#define GL_SGIX_instruments 1
19961+#ifdef GL_GLEXT_PROTOTYPES
19962+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
19963+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
19964+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
19965+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
19966+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
19967+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
19968+#endif /* GL_GLEXT_PROTOTYPES */
19969+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
19970+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
19971+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
19972+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
19973+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
19974+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
19975+#endif
19976+
19977+#ifndef GL_SGIX_texture_scale_bias
19978+#define GL_SGIX_texture_scale_bias 1
19979+#endif
19980+
19981+#ifndef GL_SGIX_framezoom
19982+#define GL_SGIX_framezoom 1
19983+#ifdef GL_GLEXT_PROTOTYPES
19984+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
19985+#endif /* GL_GLEXT_PROTOTYPES */
19986+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
19987+#endif
19988+
19989+#ifndef GL_SGIX_tag_sample_buffer
19990+#define GL_SGIX_tag_sample_buffer 1
19991+#ifdef GL_GLEXT_PROTOTYPES
19992+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
19993+#endif /* GL_GLEXT_PROTOTYPES */
19994+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
19995+#endif
19996+
19997+#ifndef GL_SGIX_polynomial_ffd
19998+#define GL_SGIX_polynomial_ffd 1
19999+#ifdef GL_GLEXT_PROTOTYPES
20000+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
20001+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
20002+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
20003+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
20004+#endif /* GL_GLEXT_PROTOTYPES */
20005+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);
20006+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);
20007+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
20008+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
20009+#endif
20010+
20011+#ifndef GL_SGIX_reference_plane
20012+#define GL_SGIX_reference_plane 1
20013+#ifdef GL_GLEXT_PROTOTYPES
20014+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
20015+#endif /* GL_GLEXT_PROTOTYPES */
20016+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
20017+#endif
20018+
20019+#ifndef GL_SGIX_flush_raster
20020+#define GL_SGIX_flush_raster 1
20021+#ifdef GL_GLEXT_PROTOTYPES
20022+GLAPI void APIENTRY glFlushRasterSGIX (void);
20023+#endif /* GL_GLEXT_PROTOTYPES */
20024+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
20025+#endif
20026+
20027+#ifndef GL_SGIX_depth_texture
20028+#define GL_SGIX_depth_texture 1
20029+#endif
20030+
20031+#ifndef GL_SGIS_fog_function
20032+#define GL_SGIS_fog_function 1
20033+#ifdef GL_GLEXT_PROTOTYPES
20034+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
20035+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
20036+#endif /* GL_GLEXT_PROTOTYPES */
20037+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
20038+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
20039+#endif
20040+
20041+#ifndef GL_SGIX_fog_offset
20042+#define GL_SGIX_fog_offset 1
20043+#endif
20044+
20045+#ifndef GL_HP_image_transform
20046+#define GL_HP_image_transform 1
20047+#ifdef GL_GLEXT_PROTOTYPES
20048+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
20049+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
20050+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
20051+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
20052+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
20053+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
20054+#endif /* GL_GLEXT_PROTOTYPES */
20055+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
20056+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
20057+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
20058+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
20059+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
20060+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
20061+#endif
20062+
20063+#ifndef GL_HP_convolution_border_modes
20064+#define GL_HP_convolution_border_modes 1
20065+#endif
20066+
20067+#ifndef GL_SGIX_texture_add_env
20068+#define GL_SGIX_texture_add_env 1
20069+#endif
20070+
20071+#ifndef GL_EXT_color_subtable
20072+#define GL_EXT_color_subtable 1
20073+#ifdef GL_GLEXT_PROTOTYPES
20074+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
20075+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
20076+#endif /* GL_GLEXT_PROTOTYPES */
20077+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
20078+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
20079+#endif
20080+
20081+#ifndef GL_PGI_vertex_hints
20082+#define GL_PGI_vertex_hints 1
20083+#endif
20084+
20085+#ifndef GL_PGI_misc_hints
20086+#define GL_PGI_misc_hints 1
20087+#ifdef GL_GLEXT_PROTOTYPES
20088+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
20089+#endif /* GL_GLEXT_PROTOTYPES */
20090+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
20091+#endif
20092+
20093+#ifndef GL_EXT_paletted_texture
20094+#define GL_EXT_paletted_texture 1
20095+#ifdef GL_GLEXT_PROTOTYPES
20096+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
20097+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
20098+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
20099+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
20100+#endif /* GL_GLEXT_PROTOTYPES */
20101+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
20102+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
20103+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20104+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20105+#endif
20106+
20107+#ifndef GL_EXT_clip_volume_hint
20108+#define GL_EXT_clip_volume_hint 1
20109+#endif
20110+
20111+#ifndef GL_SGIX_list_priority
20112+#define GL_SGIX_list_priority 1
20113+#ifdef GL_GLEXT_PROTOTYPES
20114+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
20115+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
20116+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
20117+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
20118+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
20119+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
20120+#endif /* GL_GLEXT_PROTOTYPES */
20121+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
20122+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
20123+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
20124+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
20125+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
20126+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
20127+#endif
20128+
20129+#ifndef GL_SGIX_ir_instrument1
20130+#define GL_SGIX_ir_instrument1 1
20131+#endif
20132+
20133+#ifndef GL_SGIX_calligraphic_fragment
20134+#define GL_SGIX_calligraphic_fragment 1
20135+#endif
20136+
20137+#ifndef GL_SGIX_texture_lod_bias
20138+#define GL_SGIX_texture_lod_bias 1
20139+#endif
20140+
20141+#ifndef GL_SGIX_shadow_ambient
20142+#define GL_SGIX_shadow_ambient 1
20143+#endif
20144+
20145+#ifndef GL_EXT_index_texture
20146+#define GL_EXT_index_texture 1
20147+#endif
20148+
20149+#ifndef GL_EXT_index_material
20150+#define GL_EXT_index_material 1
20151+#ifdef GL_GLEXT_PROTOTYPES
20152+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
20153+#endif /* GL_GLEXT_PROTOTYPES */
20154+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
20155+#endif
20156+
20157+#ifndef GL_EXT_index_func
20158+#define GL_EXT_index_func 1
20159+#ifdef GL_GLEXT_PROTOTYPES
20160+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
20161+#endif /* GL_GLEXT_PROTOTYPES */
20162+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
20163+#endif
20164+
20165+#ifndef GL_EXT_index_array_formats
20166+#define GL_EXT_index_array_formats 1
20167+#endif
20168+
20169+#ifndef GL_EXT_compiled_vertex_array
20170+#define GL_EXT_compiled_vertex_array 1
20171+#ifdef GL_GLEXT_PROTOTYPES
20172+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
20173+GLAPI void APIENTRY glUnlockArraysEXT (void);
20174+#endif /* GL_GLEXT_PROTOTYPES */
20175+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
20176+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
20177+#endif
20178+
20179+#ifndef GL_EXT_cull_vertex
20180+#define GL_EXT_cull_vertex 1
20181+#ifdef GL_GLEXT_PROTOTYPES
20182+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
20183+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
20184+#endif /* GL_GLEXT_PROTOTYPES */
20185+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
20186+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
20187+#endif
20188+
20189+#ifndef GL_SGIX_ycrcb
20190+#define GL_SGIX_ycrcb 1
20191+#endif
20192+
20193+#ifndef GL_SGIX_fragment_lighting
20194+#define GL_SGIX_fragment_lighting 1
20195+#ifdef GL_GLEXT_PROTOTYPES
20196+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
20197+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
20198+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
20199+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
20200+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
20201+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
20202+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
20203+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
20204+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
20205+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
20206+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
20207+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
20208+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
20209+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
20210+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
20211+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
20212+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
20213+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
20214+#endif /* GL_GLEXT_PROTOTYPES */
20215+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
20216+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
20217+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
20218+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
20219+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
20220+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
20221+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
20222+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
20223+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
20224+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
20225+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
20226+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
20227+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
20228+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
20229+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
20230+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
20231+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
20232+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
20233+#endif
20234+
20235+#ifndef GL_IBM_rasterpos_clip
20236+#define GL_IBM_rasterpos_clip 1
20237+#endif
20238+
20239+#ifndef GL_HP_texture_lighting
20240+#define GL_HP_texture_lighting 1
20241+#endif
20242+
20243+#ifndef GL_EXT_draw_range_elements
20244+#define GL_EXT_draw_range_elements 1
20245+#ifdef GL_GLEXT_PROTOTYPES
20246+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
20247+#endif /* GL_GLEXT_PROTOTYPES */
20248+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
20249+#endif
20250+
20251+#ifndef GL_WIN_phong_shading
20252+#define GL_WIN_phong_shading 1
20253+#endif
20254+
20255+#ifndef GL_WIN_specular_fog
20256+#define GL_WIN_specular_fog 1
20257+#endif
20258+
20259+#ifndef GL_EXT_light_texture
20260+#define GL_EXT_light_texture 1
20261+#ifdef GL_GLEXT_PROTOTYPES
20262+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
20263+GLAPI void APIENTRY glTextureLightEXT (GLenum);
20264+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
20265+#endif /* GL_GLEXT_PROTOTYPES */
20266+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
20267+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
20268+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
20269+#endif
20270+
20271+#ifndef GL_SGIX_blend_alpha_minmax
20272+#define GL_SGIX_blend_alpha_minmax 1
20273+#endif
20274+
20275+#ifndef GL_EXT_bgra
20276+#define GL_EXT_bgra 1
20277+#endif
20278+
20279+#ifndef GL_SGIX_async
20280+#define GL_SGIX_async 1
20281+#ifdef GL_GLEXT_PROTOTYPES
20282+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
20283+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
20284+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
20285+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
20286+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
20287+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
20288+#endif /* GL_GLEXT_PROTOTYPES */
20289+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
20290+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
20291+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
20292+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
20293+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
20294+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
20295+#endif
20296+
20297+#ifndef GL_SGIX_async_pixel
20298+#define GL_SGIX_async_pixel 1
20299+#endif
20300+
20301+#ifndef GL_SGIX_async_histogram
20302+#define GL_SGIX_async_histogram 1
20303+#endif
20304+
20305+#ifndef GL_INTEL_parallel_arrays
20306+#define GL_INTEL_parallel_arrays 1
20307+#ifdef GL_GLEXT_PROTOTYPES
20308+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
20309+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
20310+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
20311+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
20312+#endif /* GL_GLEXT_PROTOTYPES */
20313+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20314+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
20315+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20316+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20317+#endif
20318+
20319+#ifndef GL_HP_occlusion_test
20320+#define GL_HP_occlusion_test 1
20321+#endif
20322+
20323+#ifndef GL_EXT_pixel_transform
20324+#define GL_EXT_pixel_transform 1
20325+#ifdef GL_GLEXT_PROTOTYPES
20326+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
20327+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
20328+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
20329+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
20330+/* ERO Begin */
20331+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
20332+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
20333+/* ERO End */
20334+#endif /* GL_GLEXT_PROTOTYPES */
20335+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
20336+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
20337+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
20338+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
20339+/* ERO Begin */
20340+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20341+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20342+/* ERO End */
20343+#endif
20344+
20345+#ifndef GL_EXT_pixel_transform_color_table
20346+#define GL_EXT_pixel_transform_color_table 1
20347+#endif
20348+
20349+#ifndef GL_EXT_shared_texture_palette
20350+#define GL_EXT_shared_texture_palette 1
20351+#endif
20352+
20353+#ifndef GL_EXT_separate_specular_color
20354+#define GL_EXT_separate_specular_color 1
20355+#endif
20356+
20357+#ifndef GL_EXT_secondary_color
20358+#define GL_EXT_secondary_color 1
20359+#ifdef GL_GLEXT_PROTOTYPES
20360+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
20361+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
20362+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
20363+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
20364+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
20365+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
20366+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
20367+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
20368+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
20369+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
20370+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
20371+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
20372+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
20373+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
20374+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
20375+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
20376+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
20377+#endif /* GL_GLEXT_PROTOTYPES */
20378+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
20379+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
20380+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
20381+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
20382+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
20383+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
20384+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
20385+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
20386+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
20387+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
20388+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
20389+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
20390+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
20391+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
20392+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
20393+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
20394+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
20395+#endif
20396+
20397+#ifndef GL_EXT_texture_perturb_normal
20398+#define GL_EXT_texture_perturb_normal 1
20399+#ifdef GL_GLEXT_PROTOTYPES
20400+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
20401+#endif /* GL_GLEXT_PROTOTYPES */
20402+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
20403+#endif
20404+
20405+#ifndef GL_EXT_multi_draw_arrays
20406+#define GL_EXT_multi_draw_arrays 1
20407+#ifdef GL_GLEXT_PROTOTYPES
20408+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
20409+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
20410+#endif /* GL_GLEXT_PROTOTYPES */
20411+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
20412+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
20413+#endif
20414+
20415+#ifndef GL_EXT_fog_coord
20416+#define GL_EXT_fog_coord 1
20417+#ifdef GL_GLEXT_PROTOTYPES
20418+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
20419+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
20420+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
20421+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
20422+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
20423+#endif /* GL_GLEXT_PROTOTYPES */
20424+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
20425+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
20426+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
20427+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
20428+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20429+#endif
20430+
20431+#ifndef GL_REND_screen_coordinates
20432+#define GL_REND_screen_coordinates 1
20433+#endif
20434+
20435+#ifndef GL_EXT_coordinate_frame
20436+#define GL_EXT_coordinate_frame 1
20437+#ifdef GL_GLEXT_PROTOTYPES
20438+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
20439+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
20440+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
20441+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
20442+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
20443+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
20444+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
20445+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
20446+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
20447+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
20448+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
20449+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
20450+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
20451+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
20452+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
20453+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
20454+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
20455+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
20456+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
20457+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
20458+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
20459+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
20460+#endif /* GL_GLEXT_PROTOTYPES */
20461+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
20462+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
20463+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
20464+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
20465+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
20466+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
20467+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
20468+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
20469+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
20470+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
20471+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
20472+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
20473+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
20474+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
20475+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
20476+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
20477+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
20478+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
20479+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
20480+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
20481+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20482+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20483+#endif
20484+
20485+#ifndef GL_EXT_texture_env_combine
20486+#define GL_EXT_texture_env_combine 1
20487+#endif
20488+
20489+#ifndef GL_APPLE_specular_vector
20490+#define GL_APPLE_specular_vector 1
20491+#endif
20492+
20493+#ifndef GL_APPLE_transform_hint
20494+#define GL_APPLE_transform_hint 1
20495+#endif
20496+
20497+#ifndef GL_SGIX_fog_scale
20498+#define GL_SGIX_fog_scale 1
20499+#endif
20500+
20501+#ifndef GL_SUNX_constant_data
20502+#define GL_SUNX_constant_data 1
20503+#ifdef GL_GLEXT_PROTOTYPES
20504+GLAPI void APIENTRY glFinishTextureSUNX (void);
20505+#endif /* GL_GLEXT_PROTOTYPES */
20506+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
20507+#endif
20508+
20509+#ifndef GL_SUN_global_alpha
20510+#define GL_SUN_global_alpha 1
20511+#ifdef GL_GLEXT_PROTOTYPES
20512+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
20513+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
20514+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
20515+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
20516+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
20517+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
20518+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
20519+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
20520+#endif /* GL_GLEXT_PROTOTYPES */
20521+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
20522+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
20523+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
20524+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
20525+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
20526+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
20527+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
20528+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
20529+#endif
20530+
20531+#ifndef GL_SUN_triangle_list
20532+#define GL_SUN_triangle_list 1
20533+#ifdef GL_GLEXT_PROTOTYPES
20534+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
20535+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
20536+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
20537+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
20538+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
20539+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
20540+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
20541+#endif /* GL_GLEXT_PROTOTYPES */
20542+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
20543+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
20544+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
20545+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
20546+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
20547+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
20548+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
20549+#endif
20550+
20551+#ifndef GL_SUN_vertex
20552+#define GL_SUN_vertex 1
20553+#ifdef GL_GLEXT_PROTOTYPES
20554+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
20555+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
20556+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20557+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
20558+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20559+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20560+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20561+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20562+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20563+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20564+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20565+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
20566+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20567+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
20568+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20569+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
20570+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20571+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20572+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20573+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20574+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20575+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20576+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20577+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20578+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
20579+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
20580+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20581+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
20582+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20583+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20584+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20585+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20586+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20587+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20588+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20589+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20590+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20591+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20592+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20593+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20594+#endif /* GL_GLEXT_PROTOTYPES */
20595+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
20596+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20597+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20598+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20599+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20600+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
20601+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20602+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
20603+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20604+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
20605+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20606+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20607+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20608+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20609+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20610+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
20611+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20612+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
20613+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20614+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20615+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);
20616+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20617+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);
20618+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20619+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
20620+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
20621+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20622+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
20623+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20624+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
20625+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20626+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
20627+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);
20628+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20629+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20630+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
20631+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20632+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20633+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);
20634+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20635+#endif
20636+
20637+#ifndef GL_EXT_blend_func_separate
20638+#define GL_EXT_blend_func_separate 1
20639+#ifdef GL_GLEXT_PROTOTYPES
20640+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
20641+#endif /* GL_GLEXT_PROTOTYPES */
20642+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20643+#endif
20644+
20645+#ifndef GL_INGR_blend_func_separate
20646+#define GL_INGR_blend_func_separate 1
20647+#ifdef GL_GLEXT_PROTOTYPES
20648+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
20649+#endif /* GL_GLEXT_PROTOTYPES */
20650+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20651+#endif
20652+
20653+#ifndef GL_INGR_color_clamp
20654+#define GL_INGR_color_clamp 1
20655+#endif
20656+
20657+#ifndef GL_INGR_interlace_read
20658+#define GL_INGR_interlace_read 1
20659+#endif
20660+
20661+#ifndef GL_EXT_stencil_wrap
20662+#define GL_EXT_stencil_wrap 1
20663+#endif
20664+
20665+#ifndef GL_EXT_422_pixels
20666+#define GL_EXT_422_pixels 1
20667+#endif
20668+
20669+#ifndef GL_NV_texgen_reflection
20670+#define GL_NV_texgen_reflection 1
20671+#endif
20672+
20673+#ifndef GL_SUN_convolution_border_modes
20674+#define GL_SUN_convolution_border_modes 1
20675+#endif
20676+
20677+#ifndef GL_EXT_texture_env_add
20678+#define GL_EXT_texture_env_add 1
20679+#endif
20680+
20681+#ifndef GL_EXT_texture_lod_bias
20682+#define GL_EXT_texture_lod_bias 1
20683+#endif
20684+
20685+#ifndef GL_EXT_texture_filter_anisotropic
20686+#define GL_EXT_texture_filter_anisotropic 1
20687+#endif
20688+
20689+#ifndef GL_EXT_vertex_weighting
20690+#define GL_EXT_vertex_weighting 1
20691+#ifdef GL_GLEXT_PROTOTYPES
20692+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
20693+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
20694+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
20695+#endif /* GL_GLEXT_PROTOTYPES */
20696+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
20697+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
20698+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
20699+#endif
20700+
20701+#ifndef GL_NV_light_max_exponent
20702+#define GL_NV_light_max_exponent 1
20703+#endif
20704+
20705+#ifndef GL_NV_vertex_array_range
20706+#define GL_NV_vertex_array_range 1
20707+#ifdef GL_GLEXT_PROTOTYPES
20708+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
20709+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
20710+#endif /* GL_GLEXT_PROTOTYPES */
20711+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
20712+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
20713+#endif
20714+
20715+#ifndef GL_NV_register_combiners
20716+#define GL_NV_register_combiners 1
20717+#ifdef GL_GLEXT_PROTOTYPES
20718+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
20719+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
20720+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
20721+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
20722+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
20723+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
20724+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
20725+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
20726+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
20727+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
20728+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
20729+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
20730+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
20731+#endif /* GL_GLEXT_PROTOTYPES */
20732+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
20733+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
20734+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20735+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
20736+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20737+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
20738+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20739+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
20740+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
20741+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
20742+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
20743+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
20744+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
20745+#endif
20746+
20747+#ifndef GL_NV_fog_distance
20748+#define GL_NV_fog_distance 1
20749+#endif
20750+
20751+#ifndef GL_NV_texgen_emboss
20752+#define GL_NV_texgen_emboss 1
20753+#endif
20754+
20755+#ifndef GL_NV_blend_square
20756+#define GL_NV_blend_square 1
20757+#endif
20758+
20759+#ifndef GL_NV_texture_env_combine4
20760+#define GL_NV_texture_env_combine4 1
20761+#endif
20762+
20763+#ifndef GL_MESA_resize_buffers
20764+#define GL_MESA_resize_buffers 1
20765+#ifdef GL_GLEXT_PROTOTYPES
20766+GLAPI void APIENTRY glResizeBuffersMESA (void);
20767+#endif /* GL_GLEXT_PROTOTYPES */
20768+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
20769+#endif
20770+
20771+#ifndef GL_MESA_window_pos
20772+#define GL_MESA_window_pos 1
20773+#ifdef GL_GLEXT_PROTOTYPES
20774+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
20775+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
20776+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
20777+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
20778+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
20779+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
20780+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
20781+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
20782+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
20783+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
20784+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
20785+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
20786+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
20787+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
20788+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
20789+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
20790+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
20791+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
20792+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
20793+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
20794+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
20795+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
20796+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
20797+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
20798+#endif /* GL_GLEXT_PROTOTYPES */
20799+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
20800+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
20801+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
20802+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
20803+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
20804+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
20805+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
20806+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
20807+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
20808+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
20809+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
20810+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
20811+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
20812+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
20813+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
20814+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
20815+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20816+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
20817+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20818+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
20819+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
20820+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
20821+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
20822+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
20823+#endif
20824+
20825+#ifndef GL_IBM_cull_vertex
20826+#define GL_IBM_cull_vertex 1
20827+#endif
20828+
20829+#ifndef GL_IBM_multimode_draw_arrays
20830+#define GL_IBM_multimode_draw_arrays 1
20831+#ifdef GL_GLEXT_PROTOTYPES
20832+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
20833+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
20834+#endif /* GL_GLEXT_PROTOTYPES */
20835+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
20836+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
20837+#endif
20838+
20839+#ifndef GL_IBM_vertex_array_lists
20840+#define GL_IBM_vertex_array_lists 1
20841+#ifdef GL_GLEXT_PROTOTYPES
20842+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20843+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20844+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
20845+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20846+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20847+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20848+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20849+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20850+#endif /* GL_GLEXT_PROTOTYPES */
20851+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20852+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20853+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
20854+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20855+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20856+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20857+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20858+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20859+#endif
20860+
20861+#ifndef GL_SGIX_subsample
20862+#define GL_SGIX_subsample 1
20863+#endif
20864+
20865+#ifndef GL_SGIX_ycrcba
20866+#define GL_SGIX_ycrcba 1
20867+#endif
20868+
20869+#ifndef GL_SGIX_ycrcb_subsample
20870+#define GL_SGIX_ycrcb_subsample 1
20871+#endif
20872+
20873+#ifndef GL_SGIX_depth_pass_instrument
20874+#define GL_SGIX_depth_pass_instrument 1
20875+#endif
20876+
20877+#ifndef GL_3DFX_texture_compression_FXT1
20878+#define GL_3DFX_texture_compression_FXT1 1
20879+#endif
20880+
20881+#ifndef GL_3DFX_multisample
20882+#define GL_3DFX_multisample 1
20883+#endif
20884+
20885+#ifndef GL_3DFX_tbuffer
20886+#define GL_3DFX_tbuffer 1
20887+#ifdef GL_GLEXT_PROTOTYPES
20888+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
20889+#endif /* GL_GLEXT_PROTOTYPES */
20890+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
20891+#endif
20892+
20893+#ifndef GL_EXT_multisample
20894+#define GL_EXT_multisample 1
20895+#ifdef GL_GLEXT_PROTOTYPES
20896+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
20897+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
20898+#endif /* GL_GLEXT_PROTOTYPES */
20899+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
20900+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
20901+#endif
20902+
20903+#ifndef GL_SGIX_vertex_preclip
20904+#define GL_SGIX_vertex_preclip 1
20905+#endif
20906+
20907+#ifndef GL_SGIX_convolution_accuracy
20908+#define GL_SGIX_convolution_accuracy 1
20909+#endif
20910+
20911+#ifndef GL_SGIX_resample
20912+#define GL_SGIX_resample 1
20913+#endif
20914+
20915+#ifndef GL_SGIS_point_line_texgen
20916+#define GL_SGIS_point_line_texgen 1
20917+#endif
20918+
20919+#ifndef GL_SGIS_texture_color_mask
20920+#define GL_SGIS_texture_color_mask 1
20921+#ifdef GL_GLEXT_PROTOTYPES
20922+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
20923+#endif /* GL_GLEXT_PROTOTYPES */
20924+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
20925+#endif
20926+
20927+#ifndef GL_SGIX_igloo_interface
20928+#define GL_SGIX_igloo_interface 1
20929+#ifdef GL_GLEXT_PROTOTYPES
20930+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
20931+#endif /* GL_GLEXT_PROTOTYPES */
20932+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
20933+#endif
20934+
20935+#ifndef GL_EXT_texture_env_dot3
20936+#define GL_EXT_texture_env_dot3 1
20937+#endif
20938+
20939+#ifndef GL_ATI_texture_mirror_once
20940+#define GL_ATI_texture_mirror_once 1
20941+#endif
20942+
20943+#ifndef GL_NV_fence
20944+#define GL_NV_fence 1
20945+#ifdef GL_GLEXT_PROTOTYPES
20946+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
20947+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
20948+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
20949+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
20950+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
20951+GLAPI void APIENTRY glFinishFenceNV (GLuint);
20952+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
20953+#endif /* GL_GLEXT_PROTOTYPES */
20954+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
20955+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
20956+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
20957+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
20958+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
20959+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
20960+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
20961+#endif
20962+
20963+#ifndef GL_NV_evaluators
20964+#define GL_NV_evaluators 1
20965+#ifdef GL_GLEXT_PROTOTYPES
20966+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
20967+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
20968+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
20969+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
20970+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
20971+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
20972+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
20973+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20974+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
20975+#endif /* GL_GLEXT_PROTOTYPES */
20976+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
20977+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
20978+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
20979+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
20980+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
20981+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
20982+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
20983+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20984+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
20985+#endif
20986+
20987+#ifndef GL_NV_packed_depth_stencil
20988+#define GL_NV_packed_depth_stencil 1
20989+#endif
20990+
20991+#ifndef GL_NV_register_combiners2
20992+#define GL_NV_register_combiners2 1
20993+#ifdef GL_GLEXT_PROTOTYPES
20994+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
20995+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
20996+#endif /* GL_GLEXT_PROTOTYPES */
20997+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
20998+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
20999+#endif
21000+
21001+#ifndef GL_NV_texture_compression_vtc
21002+#define GL_NV_texture_compression_vtc 1
21003+#endif
21004+
21005+#ifndef GL_NV_texture_rectangle
21006+#define GL_NV_texture_rectangle 1
21007+#endif
21008+
21009+#ifndef GL_NV_texture_shader
21010+#define GL_NV_texture_shader 1
21011+#endif
21012+
21013+#ifndef GL_NV_texture_shader2
21014+#define GL_NV_texture_shader2 1
21015+#endif
21016+
21017+#ifndef GL_NV_vertex_array_range2
21018+#define GL_NV_vertex_array_range2 1
21019+#endif
21020+
21021+#ifndef GL_NV_vertex_program
21022+#define GL_NV_vertex_program 1
21023+#ifdef GL_GLEXT_PROTOTYPES
21024+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
21025+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
21026+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
21027+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
21028+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
21029+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
21030+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
21031+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
21032+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
21033+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
21034+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
21035+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
21036+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
21037+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
21038+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
21039+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
21040+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
21041+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
21042+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
21043+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
21044+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
21045+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
21046+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
21047+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
21048+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
21049+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
21050+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
21051+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
21052+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
21053+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
21054+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
21055+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
21056+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
21057+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
21058+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
21059+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
21060+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
21061+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
21062+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
21063+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
21064+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
21065+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
21066+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
21067+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
21068+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
21069+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
21070+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
21071+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
21072+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
21073+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
21074+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
21075+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
21076+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
21077+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
21078+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
21079+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
21080+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
21081+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
21082+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
21083+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
21084+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
21085+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
21086+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
21087+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
21088+#endif /* GL_GLEXT_PROTOTYPES */
21089+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
21090+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
21091+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
21092+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
21093+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
21094+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
21095+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
21096+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21097+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
21098+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
21099+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
21100+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
21101+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
21102+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
21103+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
21104+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
21105+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21106+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
21107+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21108+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
21109+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
21110+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
21111+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
21112+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
21113+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
21114+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
21115+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
21116+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
21117+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
21118+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
21119+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
21120+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
21121+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
21122+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
21123+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
21124+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
21125+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
21126+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
21127+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
21128+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
21129+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
21130+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
21131+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
21132+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21133+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
21134+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21135+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
21136+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
21137+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
21138+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
21139+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
21140+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21141+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21142+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21143+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21144+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21145+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21146+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21147+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21148+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21149+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21150+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21151+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21152+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
21153+#endif
21154+
21155+#ifndef GL_SGIX_texture_coordinate_clamp
21156+#define GL_SGIX_texture_coordinate_clamp 1
21157+#endif
21158+
21159+#ifndef GL_SGIX_scalebias_hint
21160+#define GL_SGIX_scalebias_hint 1
21161+#endif
21162+
21163+#ifndef GL_OML_interlace
21164+#define GL_OML_interlace 1
21165+#endif
21166+
21167+#ifndef GL_OML_subsample
21168+#define GL_OML_subsample 1
21169+#endif
21170+
21171+#ifndef GL_OML_resample
21172+#define GL_OML_resample 1
21173+#endif
21174+
21175+#ifndef GL_NV_copy_depth_to_color
21176+#define GL_NV_copy_depth_to_color 1
21177+#endif
21178+
21179+#ifndef GL_ATI_envmap_bumpmap
21180+#define GL_ATI_envmap_bumpmap 1
21181+#ifdef GL_GLEXT_PROTOTYPES
21182+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
21183+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
21184+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
21185+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
21186+#endif /* GL_GLEXT_PROTOTYPES */
21187+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
21188+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
21189+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
21190+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
21191+#endif
21192+
21193+#ifndef GL_ATI_fragment_shader
21194+#define GL_ATI_fragment_shader 1
21195+#ifdef GL_GLEXT_PROTOTYPES
21196+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
21197+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
21198+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
21199+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
21200+GLAPI void APIENTRY glEndFragmentShaderATI (void);
21201+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
21202+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
21203+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21204+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21205+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21206+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21207+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21208+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21209+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
21210+#endif /* GL_GLEXT_PROTOTYPES */
21211+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
21212+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
21213+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
21214+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
21215+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
21216+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
21217+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
21218+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21219+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21220+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);
21221+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21222+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21223+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);
21224+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
21225+#endif
21226+
21227+#ifndef GL_ATI_pn_triangles
21228+#define GL_ATI_pn_triangles 1
21229+#ifdef GL_GLEXT_PROTOTYPES
21230+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
21231+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
21232+#endif /* GL_GLEXT_PROTOTYPES */
21233+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
21234+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
21235+#endif
21236+
21237+#ifndef GL_ATI_vertex_array_object
21238+#define GL_ATI_vertex_array_object 1
21239+#ifdef GL_GLEXT_PROTOTYPES
21240+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
21241+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
21242+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
21243+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
21244+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
21245+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
21246+/* ERO Begin */
21247+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
21248+/* ERO End */
21249+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
21250+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
21251+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
21252+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
21253+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21254+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
21255+#endif /* GL_GLEXT_PROTOTYPES */
21256+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
21257+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
21258+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
21259+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
21260+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
21261+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
21262+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21263+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
21264+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
21265+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21266+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
21267+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
21268+#endif
21269+
21270+#ifndef GL_EXT_vertex_shader
21271+#define GL_EXT_vertex_shader 1
21272+#ifdef GL_GLEXT_PROTOTYPES
21273+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
21274+GLAPI void APIENTRY glEndVertexShaderEXT (void);
21275+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
21276+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
21277+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
21278+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
21279+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
21280+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
21281+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21282+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21283+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
21284+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
21285+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
21286+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
21287+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
21288+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
21289+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
21290+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
21291+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
21292+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
21293+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
21294+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
21295+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
21296+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
21297+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
21298+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
21299+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
21300+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
21301+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
21302+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
21303+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
21304+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
21305+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21306+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
21307+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
21308+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
21309+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21310+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
21311+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
21312+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
21313+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
21314+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
21315+#endif /* GL_GLEXT_PROTOTYPES */
21316+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
21317+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
21318+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
21319+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
21320+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
21321+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
21322+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
21323+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
21324+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21325+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21326+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21327+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21328+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
21329+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21330+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21331+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
21332+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
21333+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
21334+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
21335+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
21336+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
21337+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
21338+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
21339+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
21340+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21341+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21342+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
21343+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
21344+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
21345+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
21346+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
21347+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
21348+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21349+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21350+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21351+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
21352+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21353+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21354+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21355+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21356+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21357+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21358+#endif
21359+
21360+#ifndef GL_ATI_vertex_streams
21361+#define GL_ATI_vertex_streams 1
21362+#ifdef GL_GLEXT_PROTOTYPES
21363+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
21364+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
21365+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
21366+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
21367+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
21368+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
21369+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
21370+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
21371+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
21372+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
21373+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
21374+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
21375+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
21376+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
21377+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
21378+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
21379+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
21380+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
21381+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
21382+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
21383+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21384+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
21385+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21386+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
21387+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
21388+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
21389+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
21390+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
21391+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
21392+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
21393+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
21394+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
21395+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
21396+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
21397+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
21398+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
21399+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
21400+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
21401+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21402+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
21403+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21404+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
21405+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
21406+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
21407+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
21408+#endif /* GL_GLEXT_PROTOTYPES */
21409+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
21410+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
21411+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
21412+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
21413+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
21414+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
21415+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
21416+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
21417+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
21418+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
21419+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
21420+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
21421+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
21422+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
21423+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
21424+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
21425+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
21426+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21427+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
21428+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21429+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
21430+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21431+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
21432+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21433+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
21434+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
21435+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
21436+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
21437+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21438+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
21439+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21440+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
21441+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
21442+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
21443+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
21444+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21445+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
21446+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21447+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
21448+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21449+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
21450+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21451+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
21452+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
21453+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
21454+#endif
21455+
21456+#ifndef GL_ATI_element_array
21457+#define GL_ATI_element_array 1
21458+#ifdef GL_GLEXT_PROTOTYPES
21459+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
21460+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
21461+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
21462+#endif /* GL_GLEXT_PROTOTYPES */
21463+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
21464+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
21465+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
21466+#endif
21467+
21468+#ifndef GL_SUN_mesh_array
21469+#define GL_SUN_mesh_array 1
21470+#ifdef GL_GLEXT_PROTOTYPES
21471+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
21472+#endif /* GL_GLEXT_PROTOTYPES */
21473+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
21474+#endif
21475+
21476+#ifndef GL_SUN_slice_accum
21477+#define GL_SUN_slice_accum 1
21478+#endif
21479+
21480+#ifndef GL_NV_multisample_filter_hint
21481+#define GL_NV_multisample_filter_hint 1
21482+#endif
21483+
21484+#ifndef GL_NV_depth_clamp
21485+#define GL_NV_depth_clamp 1
21486+#endif
21487+
21488+#ifndef GL_NV_occlusion_query
21489+#define GL_NV_occlusion_query 1
21490+#ifdef GL_GLEXT_PROTOTYPES
21491+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
21492+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
21493+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
21494+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
21495+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
21496+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
21497+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
21498+#endif /* GL_GLEXT_PROTOTYPES */
21499+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
21500+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
21501+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
21502+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
21503+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
21504+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21505+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
21506+#endif
21507+
21508+#ifndef GL_NV_point_sprite
21509+#define GL_NV_point_sprite 1
21510+#ifdef GL_GLEXT_PROTOTYPES
21511+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
21512+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
21513+#endif /* GL_GLEXT_PROTOTYPES */
21514+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
21515+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
21516+#endif
21517+
21518+#ifndef GL_NV_texture_shader3
21519+#define GL_NV_texture_shader3 1
21520+#endif
21521+
21522+#ifndef GL_NV_vertex_program1_1
21523+#define GL_NV_vertex_program1_1 1
21524+#endif
21525+
21526+#ifndef GL_EXT_shadow_funcs
21527+#define GL_EXT_shadow_funcs 1
21528+#endif
21529+
21530+#ifndef GL_EXT_stencil_two_side
21531+#define GL_EXT_stencil_two_side 1
21532+#ifdef GL_GLEXT_PROTOTYPES
21533+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
21534+#endif /* GL_GLEXT_PROTOTYPES */
21535+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
21536+#endif
21537+
21538+#ifndef GL_ATI_text_fragment_shader
21539+#define GL_ATI_text_fragment_shader 1
21540+#endif
21541+
21542+#ifndef GL_APPLE_client_storage
21543+#define GL_APPLE_client_storage 1
21544+#endif
21545+
21546+#ifndef GL_APPLE_element_array
21547+#define GL_APPLE_element_array 1
21548+#ifdef GL_GLEXT_PROTOTYPES
21549+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
21550+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
21551+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
21552+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
21553+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
21554+#endif /* GL_GLEXT_PROTOTYPES */
21555+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
21556+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
21557+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
21558+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
21559+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
21560+#endif
21561+
21562+#ifndef GL_APPLE_fence
21563+#define GL_APPLE_fence 1
21564+#ifdef GL_GLEXT_PROTOTYPES
21565+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
21566+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
21567+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
21568+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
21569+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
21570+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
21571+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
21572+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
21573+#endif /* GL_GLEXT_PROTOTYPES */
21574+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
21575+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
21576+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
21577+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
21578+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
21579+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
21580+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
21581+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
21582+#endif
21583+
21584+#ifndef GL_APPLE_vertex_array_object
21585+#define GL_APPLE_vertex_array_object 1
21586+#ifdef GL_GLEXT_PROTOTYPES
21587+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
21588+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
21589+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
21590+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
21591+#endif /* GL_GLEXT_PROTOTYPES */
21592+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
21593+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
21594+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
21595+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
21596+#endif
21597+
21598+#ifndef GL_APPLE_vertex_array_range
21599+#define GL_APPLE_vertex_array_range 1
21600+#ifdef GL_GLEXT_PROTOTYPES
21601+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21602+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21603+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
21604+#endif /* GL_GLEXT_PROTOTYPES */
21605+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21606+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21607+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
21608+#endif
21609+
21610+#ifndef GL_APPLE_ycbcr_422
21611+#define GL_APPLE_ycbcr_422 1
21612+#endif
21613+
21614+#ifndef GL_S3_s3tc
21615+#define GL_S3_s3tc 1
21616+#endif
21617+
21618+#ifndef GL_ATI_draw_buffers
21619+#define GL_ATI_draw_buffers 1
21620+#ifdef GL_GLEXT_PROTOTYPES
21621+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
21622+#endif /* GL_GLEXT_PROTOTYPES */
21623+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
21624+#endif
21625+
21626+#ifndef GL_ATI_pixel_format_float
21627+#define GL_ATI_pixel_format_float 1
21628+/* This is really a WGL extension, but defines some associated GL enums.
21629+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
21630+ */
21631+#endif
21632+
21633+#ifndef GL_ATI_texture_env_combine3
21634+#define GL_ATI_texture_env_combine3 1
21635+#endif
21636+
21637+#ifndef GL_ATI_texture_float
21638+#define GL_ATI_texture_float 1
21639+#endif
21640+
21641+#ifndef GL_NV_float_buffer
21642+#define GL_NV_float_buffer 1
21643+#endif
21644+
21645+#ifndef GL_NV_fragment_program
21646+#define GL_NV_fragment_program 1
21647+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
21648+#ifdef GL_GLEXT_PROTOTYPES
21649+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
21650+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
21651+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
21652+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
21653+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
21654+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
21655+#endif /* GL_GLEXT_PROTOTYPES */
21656+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21657+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21658+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
21659+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
21660+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
21661+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
21662+#endif
21663+
21664+#ifndef GL_NV_half_float
21665+#define GL_NV_half_float 1
21666+#ifdef GL_GLEXT_PROTOTYPES
21667+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
21668+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
21669+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21670+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
21671+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21672+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
21673+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21674+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
21675+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21676+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
21677+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21678+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
21679+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
21680+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
21681+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
21682+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
21683+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21684+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
21685+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21686+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
21687+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
21688+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
21689+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
21690+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
21691+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
21692+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
21693+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21694+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
21695+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
21696+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
21697+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21698+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
21699+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
21700+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
21701+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
21702+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
21703+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
21704+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
21705+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
21706+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
21707+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21708+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
21709+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
21710+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
21711+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
21712+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
21713+#endif /* GL_GLEXT_PROTOTYPES */
21714+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
21715+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
21716+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
21717+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
21718+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21719+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
21720+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
21721+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
21722+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21723+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
21724+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
21725+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
21726+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
21727+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
21728+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
21729+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
21730+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
21731+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
21732+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21733+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
21734+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
21735+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
21736+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
21737+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
21738+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
21739+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
21740+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21741+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
21742+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
21743+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
21744+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21745+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
21746+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
21747+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
21748+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
21749+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
21750+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
21751+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
21752+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
21753+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
21754+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21755+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
21756+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21757+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21758+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21759+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21760+#endif
21761+
21762+#ifndef GL_NV_pixel_data_range
21763+#define GL_NV_pixel_data_range 1
21764+#ifdef GL_GLEXT_PROTOTYPES
21765+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
21766+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
21767+#endif /* GL_GLEXT_PROTOTYPES */
21768+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
21769+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
21770+#endif
21771+
21772+#ifndef GL_NV_primitive_restart
21773+#define GL_NV_primitive_restart 1
21774+#ifdef GL_GLEXT_PROTOTYPES
21775+GLAPI void APIENTRY glPrimitiveRestartNV (void);
21776+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
21777+#endif /* GL_GLEXT_PROTOTYPES */
21778+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
21779+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
21780+#endif
21781+
21782+#ifndef GL_NV_texture_expand_normal
21783+#define GL_NV_texture_expand_normal 1
21784+#endif
21785+
21786+#ifndef GL_NV_vertex_program2
21787+#define GL_NV_vertex_program2 1
21788+#endif
21789+
21790+#ifndef GL_ATI_map_object_buffer
21791+#define GL_ATI_map_object_buffer 1
21792+#ifdef GL_GLEXT_PROTOTYPES
21793+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
21794+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
21795+#endif /* GL_GLEXT_PROTOTYPES */
21796+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21797+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21798+#endif
21799+
21800+#ifndef GL_ATI_separate_stencil
21801+#define GL_ATI_separate_stencil 1
21802+#ifdef GL_GLEXT_PROTOTYPES
21803+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
21804+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
21805+#endif /* GL_GLEXT_PROTOTYPES */
21806+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
21807+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
21808+#endif
21809+
21810+#ifndef GL_ATI_vertex_attrib_array_object
21811+#define GL_ATI_vertex_attrib_array_object 1
21812+#ifdef GL_GLEXT_PROTOTYPES
21813+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
21814+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21815+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
21816+#endif /* GL_GLEXT_PROTOTYPES */
21817+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
21818+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
21819+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
21820+#endif
21821+
21822+#ifndef GL_OES_read_format
21823+#define GL_OES_read_format 1
21824+#endif
21825+
21826+#ifndef GL_EXT_depth_bounds_test
21827+#define GL_EXT_depth_bounds_test 1
21828+#ifdef GL_GLEXT_PROTOTYPES
21829+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
21830+#endif /* GL_GLEXT_PROTOTYPES */
21831+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
21832+#endif
21833+
21834+#ifndef GL_EXT_texture_mirror_clamp
21835+#define GL_EXT_texture_mirror_clamp 1
21836+#endif
21837+
21838+#ifndef GL_EXT_blend_equation_separate
21839+#define GL_EXT_blend_equation_separate 1
21840+#ifdef GL_GLEXT_PROTOTYPES
21841+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
21842+#endif /* GL_GLEXT_PROTOTYPES */
21843+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
21844+#endif
21845+
21846+#ifndef GL_MESA_pack_invert
21847+#define GL_MESA_pack_invert 1
21848+#endif
21849+
21850+#ifndef GL_MESA_ycbcr_texture
21851+#define GL_MESA_ycbcr_texture 1
21852+#endif
21853+
21854+#ifndef GL_EXT_pixel_buffer_object
21855+#define GL_EXT_pixel_buffer_object 1
21856+#endif
21857+
21858+#ifndef GL_NV_fragment_program_option
21859+#define GL_NV_fragment_program_option 1
21860+#endif
21861+
21862+#ifndef GL_NV_fragment_program2
21863+#define GL_NV_fragment_program2 1
21864+#endif
21865+
21866+#ifndef GL_NV_vertex_program2_option
21867+#define GL_NV_vertex_program2_option 1
21868+#endif
21869+
21870+#ifndef GL_NV_vertex_program3
21871+#define GL_NV_vertex_program3 1
21872+#endif
21873+
21874+#ifndef GL_EXT_framebuffer_object
21875+#define GL_EXT_framebuffer_object 1
21876+#ifdef GL_GLEXT_PROTOTYPES
21877+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
21878+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
21879+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
21880+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
21881+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
21882+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
21883+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
21884+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
21885+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
21886+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
21887+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
21888+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21889+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21890+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
21891+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
21892+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
21893+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
21894+#endif /* GL_GLEXT_PROTOTYPES */
21895+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
21896+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
21897+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
21898+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
21899+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
21900+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21901+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
21902+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
21903+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
21904+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
21905+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
21906+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21907+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21908+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
21909+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
21910+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
21911+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
21912+#endif
21913+
21914+#ifndef GL_GREMEDY_string_marker
21915+#define GL_GREMEDY_string_marker 1
21916+#ifdef GL_GLEXT_PROTOTYPES
21917+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
21918+#endif /* GL_GLEXT_PROTOTYPES */
21919+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
21920+#endif
21921+
21922+#ifndef GL_EXT_packed_depth_stencil
21923+#define GL_EXT_packed_depth_stencil 1
21924+#endif
21925+
21926+#ifndef GL_EXT_stencil_clear_tag
21927+#define GL_EXT_stencil_clear_tag 1
21928+#ifdef GL_GLEXT_PROTOTYPES
21929+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
21930+#endif /* GL_GLEXT_PROTOTYPES */
21931+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
21932+#endif
21933+
21934+#ifndef GL_EXT_texture_sRGB
21935+#define GL_EXT_texture_sRGB 1
21936+#endif
21937+
21938+#ifndef GL_EXT_framebuffer_blit
21939+#define GL_EXT_framebuffer_blit 1
21940+#ifdef GL_GLEXT_PROTOTYPES
21941+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
21942+#endif /* GL_GLEXT_PROTOTYPES */
21943+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
21944+#endif
21945+
21946+#ifndef GL_EXT_framebuffer_multisample
21947+#define GL_EXT_framebuffer_multisample 1
21948+#ifdef GL_GLEXT_PROTOTYPES
21949+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
21950+#endif /* GL_GLEXT_PROTOTYPES */
21951+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
21952+#endif
21953+
21954+#ifndef GL_MESAX_texture_stack
21955+#define GL_MESAX_texture_stack 1
21956+#endif
21957+
21958+#ifndef GL_EXT_timer_query
21959+#define GL_EXT_timer_query 1
21960+#ifdef GL_GLEXT_PROTOTYPES
21961+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
21962+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
21963+#endif /* GL_GLEXT_PROTOTYPES */
21964+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
21965+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
21966+#endif
21967+
21968+#ifndef GL_EXT_gpu_program_parameters
21969+#define GL_EXT_gpu_program_parameters 1
21970+#ifdef GL_GLEXT_PROTOTYPES
21971+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21972+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21973+#endif /* GL_GLEXT_PROTOTYPES */
21974+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21975+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21976+#endif
21977+
21978+#ifndef GL_APPLE_flush_buffer_range
21979+#define GL_APPLE_flush_buffer_range 1
21980+#ifdef GL_GLEXT_PROTOTYPES
21981+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
21982+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
21983+#endif /* GL_GLEXT_PROTOTYPES */
21984+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
21985+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
21986+#endif
21987+
21988+#ifndef GL_NV_gpu_program4
21989+#define GL_NV_gpu_program4 1
21990+#ifdef GL_GLEXT_PROTOTYPES
21991+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21992+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
21993+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21994+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21995+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
21996+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21997+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21998+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
21999+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
22000+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
22001+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
22002+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
22003+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
22004+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
22005+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
22006+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
22007+#endif /* GL_GLEXT_PROTOTYPES */
22008+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
22009+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
22010+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
22011+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
22012+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
22013+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
22014+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
22015+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
22016+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
22017+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
22018+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
22019+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
22020+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
22021+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
22022+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
22023+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
22024+#endif
22025+
22026+#ifndef GL_NV_geometry_program4
22027+#define GL_NV_geometry_program4 1
22028+#ifdef GL_GLEXT_PROTOTYPES
22029+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
22030+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
22031+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
22032+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
22033+#endif /* GL_GLEXT_PROTOTYPES */
22034+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
22035+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
22036+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
22037+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
22038+#endif
22039+
22040+#ifndef GL_EXT_geometry_shader4
22041+#define GL_EXT_geometry_shader4 1
22042+#ifdef GL_GLEXT_PROTOTYPES
22043+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
22044+#endif /* GL_GLEXT_PROTOTYPES */
22045+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
22046+#endif
22047+
22048+#ifndef GL_NV_vertex_program4
22049+#define GL_NV_vertex_program4 1
22050+#ifdef GL_GLEXT_PROTOTYPES
22051+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
22052+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
22053+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
22054+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
22055+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
22056+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
22057+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
22058+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
22059+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
22060+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
22061+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
22062+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
22063+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
22064+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
22065+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
22066+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
22067+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
22068+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
22069+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
22070+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
22071+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
22072+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
22073+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
22074+#endif /* GL_GLEXT_PROTOTYPES */
22075+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
22076+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
22077+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
22078+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
22079+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
22080+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
22081+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
22082+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
22083+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
22084+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
22085+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
22086+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
22087+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
22088+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
22089+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
22090+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
22091+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
22092+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
22093+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
22094+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
22095+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
22096+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
22097+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
22098+#endif
22099+
22100+#ifndef GL_EXT_gpu_shader4
22101+#define GL_EXT_gpu_shader4 1
22102+#ifdef GL_GLEXT_PROTOTYPES
22103+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
22104+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
22105+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
22106+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
22107+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
22108+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
22109+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
22110+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
22111+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
22112+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
22113+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
22114+#endif /* GL_GLEXT_PROTOTYPES */
22115+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
22116+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
22117+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
22118+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
22119+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
22120+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
22121+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
22122+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22123+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22124+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22125+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22126+#endif
22127+
22128+#ifndef GL_EXT_draw_instanced
22129+#define GL_EXT_draw_instanced 1
22130+#ifdef GL_GLEXT_PROTOTYPES
22131+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
22132+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
22133+#endif /* GL_GLEXT_PROTOTYPES */
22134+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
22135+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
22136+#endif
22137+
22138+#ifndef GL_EXT_packed_float
22139+#define GL_EXT_packed_float 1
22140+#endif
22141+
22142+#ifndef GL_EXT_texture_array
22143+#define GL_EXT_texture_array 1
22144+#endif
22145+
22146+#ifndef GL_EXT_texture_buffer_object
22147+#define GL_EXT_texture_buffer_object 1
22148+#ifdef GL_GLEXT_PROTOTYPES
22149+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
22150+#endif /* GL_GLEXT_PROTOTYPES */
22151+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
22152+#endif
22153+
22154+#ifndef GL_EXT_texture_compression_latc
22155+#define GL_EXT_texture_compression_latc 1
22156+#endif
22157+
22158+#ifndef GL_EXT_texture_compression_rgtc
22159+#define GL_EXT_texture_compression_rgtc 1
22160+#endif
22161+
22162+#ifndef GL_EXT_texture_shared_exponent
22163+#define GL_EXT_texture_shared_exponent 1
22164+#endif
22165+
22166+#ifndef GL_NV_depth_buffer_float
22167+#define GL_NV_depth_buffer_float 1
22168+#ifdef GL_GLEXT_PROTOTYPES
22169+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
22170+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
22171+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
22172+#endif /* GL_GLEXT_PROTOTYPES */
22173+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
22174+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
22175+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
22176+#endif
22177+
22178+#ifndef GL_NV_fragment_program4
22179+#define GL_NV_fragment_program4 1
22180+#endif
22181+
22182+#ifndef GL_NV_framebuffer_multisample_coverage
22183+#define GL_NV_framebuffer_multisample_coverage 1
22184+#ifdef GL_GLEXT_PROTOTYPES
22185+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
22186+#endif /* GL_GLEXT_PROTOTYPES */
22187+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
22188+#endif
22189+
22190+#ifndef GL_EXT_framebuffer_sRGB
22191+#define GL_EXT_framebuffer_sRGB 1
22192+#endif
22193+
22194+#ifndef GL_NV_geometry_shader4
22195+#define GL_NV_geometry_shader4 1
22196+#endif
22197+
22198+#ifndef GL_NV_parameter_buffer_object
22199+#define GL_NV_parameter_buffer_object 1
22200+#ifdef GL_GLEXT_PROTOTYPES
22201+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
22202+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
22203+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
22204+#endif /* GL_GLEXT_PROTOTYPES */
22205+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
22206+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
22207+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
22208+#endif
22209+
22210+#ifndef GL_EXT_draw_buffers2
22211+#define GL_EXT_draw_buffers2 1
22212+#ifdef GL_GLEXT_PROTOTYPES
22213+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
22214+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
22215+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
22216+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
22217+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
22218+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
22219+#endif /* GL_GLEXT_PROTOTYPES */
22220+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
22221+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
22222+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
22223+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22224+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22225+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
22226+#endif
22227+
22228+#ifndef GL_NV_transform_feedback
22229+#define GL_NV_transform_feedback 1
22230+#ifdef GL_GLEXT_PROTOTYPES
22231+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
22232+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
22233+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
22234+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
22235+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
22236+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
22237+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
22238+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
22239+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
22240+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
22241+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
22242+#endif /* GL_GLEXT_PROTOTYPES */
22243+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
22244+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
22245+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
22246+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
22247+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
22248+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
22249+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
22250+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
22251+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
22252+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
22253+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
22254+#endif
22255+
22256+#ifndef GL_EXT_bindable_uniform
22257+#define GL_EXT_bindable_uniform 1
22258+#ifdef GL_GLEXT_PROTOTYPES
22259+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
22260+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
22261+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
22262+#endif /* GL_GLEXT_PROTOTYPES */
22263+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
22264+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
22265+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
22266+#endif
22267+
22268+#ifndef GL_EXT_texture_integer
22269+#define GL_EXT_texture_integer 1
22270+#ifdef GL_GLEXT_PROTOTYPES
22271+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
22272+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
22273+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
22274+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
22275+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
22276+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
22277+#endif /* GL_GLEXT_PROTOTYPES */
22278+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
22279+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
22280+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
22281+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
22282+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
22283+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
22284+#endif
22285+
22286+
22287+#ifdef __cplusplus
22288+}
22289+#endif
22290+
22291+#endif
22292+
22293+
22294+/* ERO */
22295+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
22296diff --git a/target-i386/mesa_glu.h b/target-i386/mesa_glu.h
22297new file mode 100644
22298index 0000000..f1a704b
22299--- /dev/null
22300+++ b/target-i386/mesa_glu.h
22301@@ -0,0 +1,354 @@
22302+/*
22303+** License Applicability. Except to the extent portions of this file are
22304+** made subject to an alternative license as permitted in the SGI Free
22305+** Software License B, Version 1.1 (the "License"), the contents of this
22306+** file are subject only to the provisions of the License. You may not use
22307+** this file except in compliance with the License. You may obtain a copy
22308+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
22309+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
22310+**
22311+** http://oss.sgi.com/projects/FreeB
22312+**
22313+** Note that, as provided in the License, the Software is distributed on an
22314+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
22315+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22316+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
22317+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
22318+**
22319+** Original Code. The Original Code is: OpenGL Sample Implementation,
22320+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
22321+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
22322+** Copyright in any portions created by third parties is as indicated
22323+** elsewhere herein. All Rights Reserved.
22324+**
22325+** Additional Notice Provisions: This software was created using the
22326+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
22327+** not been independently verified as being compliant with the OpenGL(R)
22328+** version 1.2.1 Specification.
22329+*/
22330+
22331+#ifndef __glu_h__
22332+#define __glu_h__
22333+
22334+#if defined(USE_MGL_NAMESPACE)
22335+#include "glu_mangle.h"
22336+#endif
22337+
22338+//#include <GL/gl.h>
22339+#include "mesa_gl.h"
22340+
22341+#ifndef GLAPIENTRY
22342+#define GLAPIENTRY
22343+#endif
22344+
22345+#ifndef GLAPIENTRYP
22346+#define GLAPIENTRYP GLAPIENTRY *
22347+#endif
22348+
22349+#ifdef GLAPI
22350+#undef GLAPI
22351+#endif
22352+
22353+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
22354+# define GLAPI __declspec(dllexport)
22355+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
22356+# define GLAPI __declspec(dllimport)
22357+# else /* for use with static link lib build of Win32 edition only */
22358+# define GLAPI extern
22359+# endif /* _STATIC_MESA support */
22360+
22361+
22362+#ifndef GLAPI
22363+#define GLAPI
22364+#endif
22365+
22366+#ifdef __cplusplus
22367+extern "C" {
22368+#endif
22369+
22370+/*************************************************************/
22371+
22372+/* Extensions */
22373+#define GLU_EXT_object_space_tess 1
22374+#define GLU_EXT_nurbs_tessellator 1
22375+
22376+/* Boolean */
22377+#define GLU_FALSE 0
22378+#define GLU_TRUE 1
22379+
22380+/* Version */
22381+#define GLU_VERSION_1_1 1
22382+#define GLU_VERSION_1_2 1
22383+#define GLU_VERSION_1_3 1
22384+
22385+/* StringName */
22386+#define GLU_VERSION 100800
22387+#define GLU_EXTENSIONS 100801
22388+
22389+/* ErrorCode */
22390+#define GLU_INVALID_ENUM 100900
22391+#define GLU_INVALID_VALUE 100901
22392+#define GLU_OUT_OF_MEMORY 100902
22393+#define GLU_INCOMPATIBLE_GL_VERSION 100903
22394+#define GLU_INVALID_OPERATION 100904
22395+
22396+/* NurbsDisplay */
22397+/* GLU_FILL */
22398+#define GLU_OUTLINE_POLYGON 100240
22399+#define GLU_OUTLINE_PATCH 100241
22400+
22401+/* NurbsCallback */
22402+#define GLU_NURBS_ERROR 100103
22403+#define GLU_ERROR 100103
22404+#define GLU_NURBS_BEGIN 100164
22405+#define GLU_NURBS_BEGIN_EXT 100164
22406+#define GLU_NURBS_VERTEX 100165
22407+#define GLU_NURBS_VERTEX_EXT 100165
22408+#define GLU_NURBS_NORMAL 100166
22409+#define GLU_NURBS_NORMAL_EXT 100166
22410+#define GLU_NURBS_COLOR 100167
22411+#define GLU_NURBS_COLOR_EXT 100167
22412+#define GLU_NURBS_TEXTURE_COORD 100168
22413+#define GLU_NURBS_TEX_COORD_EXT 100168
22414+#define GLU_NURBS_END 100169
22415+#define GLU_NURBS_END_EXT 100169
22416+#define GLU_NURBS_BEGIN_DATA 100170
22417+#define GLU_NURBS_BEGIN_DATA_EXT 100170
22418+#define GLU_NURBS_VERTEX_DATA 100171
22419+#define GLU_NURBS_VERTEX_DATA_EXT 100171
22420+#define GLU_NURBS_NORMAL_DATA 100172
22421+#define GLU_NURBS_NORMAL_DATA_EXT 100172
22422+#define GLU_NURBS_COLOR_DATA 100173
22423+#define GLU_NURBS_COLOR_DATA_EXT 100173
22424+#define GLU_NURBS_TEXTURE_COORD_DATA 100174
22425+#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
22426+#define GLU_NURBS_END_DATA 100175
22427+#define GLU_NURBS_END_DATA_EXT 100175
22428+
22429+/* NurbsError */
22430+#define GLU_NURBS_ERROR1 100251
22431+#define GLU_NURBS_ERROR2 100252
22432+#define GLU_NURBS_ERROR3 100253
22433+#define GLU_NURBS_ERROR4 100254
22434+#define GLU_NURBS_ERROR5 100255
22435+#define GLU_NURBS_ERROR6 100256
22436+#define GLU_NURBS_ERROR7 100257
22437+#define GLU_NURBS_ERROR8 100258
22438+#define GLU_NURBS_ERROR9 100259
22439+#define GLU_NURBS_ERROR10 100260
22440+#define GLU_NURBS_ERROR11 100261
22441+#define GLU_NURBS_ERROR12 100262
22442+#define GLU_NURBS_ERROR13 100263
22443+#define GLU_NURBS_ERROR14 100264
22444+#define GLU_NURBS_ERROR15 100265
22445+#define GLU_NURBS_ERROR16 100266
22446+#define GLU_NURBS_ERROR17 100267
22447+#define GLU_NURBS_ERROR18 100268
22448+#define GLU_NURBS_ERROR19 100269
22449+#define GLU_NURBS_ERROR20 100270
22450+#define GLU_NURBS_ERROR21 100271
22451+#define GLU_NURBS_ERROR22 100272
22452+#define GLU_NURBS_ERROR23 100273
22453+#define GLU_NURBS_ERROR24 100274
22454+#define GLU_NURBS_ERROR25 100275
22455+#define GLU_NURBS_ERROR26 100276
22456+#define GLU_NURBS_ERROR27 100277
22457+#define GLU_NURBS_ERROR28 100278
22458+#define GLU_NURBS_ERROR29 100279
22459+#define GLU_NURBS_ERROR30 100280
22460+#define GLU_NURBS_ERROR31 100281
22461+#define GLU_NURBS_ERROR32 100282
22462+#define GLU_NURBS_ERROR33 100283
22463+#define GLU_NURBS_ERROR34 100284
22464+#define GLU_NURBS_ERROR35 100285
22465+#define GLU_NURBS_ERROR36 100286
22466+#define GLU_NURBS_ERROR37 100287
22467+
22468+/* NurbsProperty */
22469+#define GLU_AUTO_LOAD_MATRIX 100200
22470+#define GLU_CULLING 100201
22471+#define GLU_SAMPLING_TOLERANCE 100203
22472+#define GLU_DISPLAY_MODE 100204
22473+#define GLU_PARAMETRIC_TOLERANCE 100202
22474+#define GLU_SAMPLING_METHOD 100205
22475+#define GLU_U_STEP 100206
22476+#define GLU_V_STEP 100207
22477+#define GLU_NURBS_MODE 100160
22478+#define GLU_NURBS_MODE_EXT 100160
22479+#define GLU_NURBS_TESSELLATOR 100161
22480+#define GLU_NURBS_TESSELLATOR_EXT 100161
22481+#define GLU_NURBS_RENDERER 100162
22482+#define GLU_NURBS_RENDERER_EXT 100162
22483+
22484+/* NurbsSampling */
22485+#define GLU_OBJECT_PARAMETRIC_ERROR 100208
22486+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
22487+#define GLU_OBJECT_PATH_LENGTH 100209
22488+#define GLU_OBJECT_PATH_LENGTH_EXT 100209
22489+#define GLU_PATH_LENGTH 100215
22490+#define GLU_PARAMETRIC_ERROR 100216
22491+#define GLU_DOMAIN_DISTANCE 100217
22492+
22493+/* NurbsTrim */
22494+#define GLU_MAP1_TRIM_2 100210
22495+#define GLU_MAP1_TRIM_3 100211
22496+
22497+/* QuadricDrawStyle */
22498+#define GLU_POINT 100010
22499+#define GLU_LINE 100011
22500+#define GLU_FILL 100012
22501+#define GLU_SILHOUETTE 100013
22502+
22503+/* QuadricCallback */
22504+/* GLU_ERROR */
22505+
22506+/* QuadricNormal */
22507+#define GLU_SMOOTH 100000
22508+#define GLU_FLAT 100001
22509+#define GLU_NONE 100002
22510+
22511+/* QuadricOrientation */
22512+#define GLU_OUTSIDE 100020
22513+#define GLU_INSIDE 100021
22514+
22515+/* TessCallback */
22516+#define GLU_TESS_BEGIN 100100
22517+#define GLU_BEGIN 100100
22518+#define GLU_TESS_VERTEX 100101
22519+#define GLU_VERTEX 100101
22520+#define GLU_TESS_END 100102
22521+#define GLU_END 100102
22522+#define GLU_TESS_ERROR 100103
22523+#define GLU_TESS_EDGE_FLAG 100104
22524+#define GLU_EDGE_FLAG 100104
22525+#define GLU_TESS_COMBINE 100105
22526+#define GLU_TESS_BEGIN_DATA 100106
22527+#define GLU_TESS_VERTEX_DATA 100107
22528+#define GLU_TESS_END_DATA 100108
22529+#define GLU_TESS_ERROR_DATA 100109
22530+#define GLU_TESS_EDGE_FLAG_DATA 100110
22531+#define GLU_TESS_COMBINE_DATA 100111
22532+
22533+/* TessContour */
22534+#define GLU_CW 100120
22535+#define GLU_CCW 100121
22536+#define GLU_INTERIOR 100122
22537+#define GLU_EXTERIOR 100123
22538+#define GLU_UNKNOWN 100124
22539+
22540+/* TessProperty */
22541+#define GLU_TESS_WINDING_RULE 100140
22542+#define GLU_TESS_BOUNDARY_ONLY 100141
22543+#define GLU_TESS_TOLERANCE 100142
22544+
22545+/* TessError */
22546+#define GLU_TESS_ERROR1 100151
22547+#define GLU_TESS_ERROR2 100152
22548+#define GLU_TESS_ERROR3 100153
22549+#define GLU_TESS_ERROR4 100154
22550+#define GLU_TESS_ERROR5 100155
22551+#define GLU_TESS_ERROR6 100156
22552+#define GLU_TESS_ERROR7 100157
22553+#define GLU_TESS_ERROR8 100158
22554+#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
22555+#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
22556+#define GLU_TESS_MISSING_END_POLYGON 100153
22557+#define GLU_TESS_MISSING_END_CONTOUR 100154
22558+#define GLU_TESS_COORD_TOO_LARGE 100155
22559+#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
22560+
22561+/* TessWinding */
22562+#define GLU_TESS_WINDING_ODD 100130
22563+#define GLU_TESS_WINDING_NONZERO 100131
22564+#define GLU_TESS_WINDING_POSITIVE 100132
22565+#define GLU_TESS_WINDING_NEGATIVE 100133
22566+#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
22567+
22568+/*************************************************************/
22569+
22570+
22571+#ifdef __cplusplus
22572+class GLUnurbs;
22573+class GLUquadric;
22574+class GLUtesselator;
22575+#else
22576+typedef struct GLUnurbs GLUnurbs;
22577+typedef struct GLUquadric GLUquadric;
22578+typedef struct GLUtesselator GLUtesselator;
22579+#endif
22580+
22581+typedef GLUnurbs GLUnurbsObj;
22582+typedef GLUquadric GLUquadricObj;
22583+typedef GLUtesselator GLUtesselatorObj;
22584+typedef GLUtesselator GLUtriangulatorObj;
22585+
22586+#define GLU_TESS_MAX_COORD 1.0e150
22587+
22588+/* Internal convenience typedefs */
22589+typedef void (GLAPIENTRYP _GLUfuncptr)();
22590+
22591+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
22592+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
22593+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
22594+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
22595+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22596+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
22597+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);
22598+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
22599+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);
22600+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
22601+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
22602+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
22603+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
22604+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
22605+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
22606+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
22607+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
22608+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
22609+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
22610+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
22611+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
22612+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
22613+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
22614+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
22615+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
22616+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
22617+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
22618+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
22619+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
22620+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
22621+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
22622+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
22623+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
22624+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
22625+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
22626+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);
22627+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
22628+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
22629+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
22630+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
22631+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);
22632+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
22633+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
22634+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
22635+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
22636+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
22637+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
22638+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
22639+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
22640+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
22641+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
22642+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
22643+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
22644+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
22645+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
22646+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
22647+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
22648+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);
22649+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);
22650+
22651+#ifdef __cplusplus
22652+}
22653+#endif
22654+
22655+#endif /* __glu_h__ */
22656diff --git a/target-i386/mesa_glx.h b/target-i386/mesa_glx.h
22657new file mode 100644
22658index 0000000..2930461
22659--- /dev/null
22660+++ b/target-i386/mesa_glx.h
22661@@ -0,0 +1,510 @@
22662+/*
22663+ * Mesa 3-D graphics library
22664+ * Version: 6.5
22665+ *
22666+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
22667+ *
22668+ * Permission is hereby granted, free of charge, to any person obtaining a
22669+ * copy of this software and associated documentation files (the "Software"),
22670+ * to deal in the Software without restriction, including without limitation
22671+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22672+ * and/or sell copies of the Software, and to permit persons to whom the
22673+ * Software is furnished to do so, subject to the following conditions:
22674+ *
22675+ * The above copyright notice and this permission notice shall be included
22676+ * in all copies or substantial portions of the Software.
22677+ *
22678+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22679+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22680+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22681+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22682+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22683+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22684+ */
22685+
22686+
22687+#ifndef GLX_H
22688+#define GLX_H
22689+
22690+
22691+#ifdef __VMS
22692+#include <GL/vms_x_fix.h>
22693+# ifdef __cplusplus
22694+/* VMS Xlib.h gives problems with C++.
22695+ * this avoids a bunch of trivial warnings */
22696+#pragma message disable nosimpint
22697+#endif
22698+#endif
22699+#include <X11/Xlib.h>
22700+#include <X11/Xutil.h>
22701+#ifdef __VMS
22702+# ifdef __cplusplus
22703+#pragma message enable nosimpint
22704+#endif
22705+#endif
22706+#include <mesa_gl.h>
22707+
22708+
22709+#if defined(USE_MGL_NAMESPACE)
22710+#include "glx_mangle.h"
22711+#endif
22712+
22713+
22714+#ifdef __cplusplus
22715+extern "C" {
22716+#endif
22717+
22718+
22719+#define GLX_VERSION_1_1 1
22720+#define GLX_VERSION_1_2 1
22721+#define GLX_VERSION_1_3 1
22722+#define GLX_VERSION_1_4 1
22723+
22724+#define GLX_EXTENSION_NAME "GLX"
22725+
22726+
22727+
22728+/*
22729+ * Tokens for glXChooseVisual and glXGetConfig:
22730+ */
22731+#define GLX_USE_GL 1
22732+#define GLX_BUFFER_SIZE 2
22733+#define GLX_LEVEL 3
22734+#define GLX_RGBA 4
22735+#define GLX_DOUBLEBUFFER 5
22736+#define GLX_STEREO 6
22737+#define GLX_AUX_BUFFERS 7
22738+#define GLX_RED_SIZE 8
22739+#define GLX_GREEN_SIZE 9
22740+#define GLX_BLUE_SIZE 10
22741+#define GLX_ALPHA_SIZE 11
22742+#define GLX_DEPTH_SIZE 12
22743+#define GLX_STENCIL_SIZE 13
22744+#define GLX_ACCUM_RED_SIZE 14
22745+#define GLX_ACCUM_GREEN_SIZE 15
22746+#define GLX_ACCUM_BLUE_SIZE 16
22747+#define GLX_ACCUM_ALPHA_SIZE 17
22748+
22749+
22750+/*
22751+ * Error codes returned by glXGetConfig:
22752+ */
22753+#define GLX_BAD_SCREEN 1
22754+#define GLX_BAD_ATTRIBUTE 2
22755+#define GLX_NO_EXTENSION 3
22756+#define GLX_BAD_VISUAL 4
22757+#define GLX_BAD_CONTEXT 5
22758+#define GLX_BAD_VALUE 6
22759+#define GLX_BAD_ENUM 7
22760+
22761+
22762+/*
22763+ * GLX 1.1 and later:
22764+ */
22765+#define GLX_VENDOR 1
22766+#define GLX_VERSION 2
22767+#define GLX_EXTENSIONS 3
22768+
22769+
22770+/*
22771+ * GLX 1.3 and later:
22772+ */
22773+#define GLX_CONFIG_CAVEAT 0x20
22774+#define GLX_DONT_CARE 0xFFFFFFFF
22775+#define GLX_X_VISUAL_TYPE 0x22
22776+#define GLX_TRANSPARENT_TYPE 0x23
22777+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22778+#define GLX_TRANSPARENT_RED_VALUE 0x25
22779+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22780+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22781+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22782+#define GLX_WINDOW_BIT 0x00000001
22783+#define GLX_PIXMAP_BIT 0x00000002
22784+#define GLX_PBUFFER_BIT 0x00000004
22785+#define GLX_AUX_BUFFERS_BIT 0x00000010
22786+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22787+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22788+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22789+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22790+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22791+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22792+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22793+#define GLX_NONE 0x8000
22794+#define GLX_SLOW_CONFIG 0x8001
22795+#define GLX_TRUE_COLOR 0x8002
22796+#define GLX_DIRECT_COLOR 0x8003
22797+#define GLX_PSEUDO_COLOR 0x8004
22798+#define GLX_STATIC_COLOR 0x8005
22799+#define GLX_GRAY_SCALE 0x8006
22800+#define GLX_STATIC_GRAY 0x8007
22801+#define GLX_TRANSPARENT_RGB 0x8008
22802+#define GLX_TRANSPARENT_INDEX 0x8009
22803+#define GLX_VISUAL_ID 0x800B
22804+#define GLX_SCREEN 0x800C
22805+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22806+#define GLX_DRAWABLE_TYPE 0x8010
22807+#define GLX_RENDER_TYPE 0x8011
22808+#define GLX_X_RENDERABLE 0x8012
22809+#define GLX_FBCONFIG_ID 0x8013
22810+#define GLX_RGBA_TYPE 0x8014
22811+#define GLX_COLOR_INDEX_TYPE 0x8015
22812+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22813+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22814+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22815+#define GLX_PRESERVED_CONTENTS 0x801B
22816+#define GLX_LARGEST_PBUFFER 0x801C
22817+#define GLX_WIDTH 0x801D
22818+#define GLX_HEIGHT 0x801E
22819+#define GLX_EVENT_MASK 0x801F
22820+#define GLX_DAMAGED 0x8020
22821+#define GLX_SAVED 0x8021
22822+#define GLX_WINDOW 0x8022
22823+#define GLX_PBUFFER 0x8023
22824+#define GLX_PBUFFER_HEIGHT 0x8040
22825+#define GLX_PBUFFER_WIDTH 0x8041
22826+#define GLX_RGBA_BIT 0x00000001
22827+#define GLX_COLOR_INDEX_BIT 0x00000002
22828+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22829+
22830+
22831+/*
22832+ * GLX 1.4 and later:
22833+ */
22834+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
22835+#define GLX_SAMPLES 0x186a1 /*100001*/
22836+
22837+
22838+
22839+typedef struct __GLXcontextRec *GLXContext;
22840+typedef XID GLXPixmap;
22841+typedef XID GLXDrawable;
22842+/* GLX 1.3 and later */
22843+typedef struct __GLXFBConfigRec *GLXFBConfig;
22844+typedef XID GLXFBConfigID;
22845+typedef XID GLXContextID;
22846+typedef XID GLXWindow;
22847+typedef XID GLXPbuffer;
22848+
22849+
22850+
22851+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
22852+ int *attribList );
22853+
22854+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
22855+ GLXContext shareList, Bool direct );
22856+
22857+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
22858+
22859+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
22860+ GLXContext ctx);
22861+
22862+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
22863+ unsigned long mask );
22864+
22865+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
22866+
22867+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
22868+ Pixmap pixmap );
22869+
22870+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
22871+
22872+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
22873+
22874+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
22875+
22876+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
22877+
22878+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
22879+ int attrib, int *value );
22880+
22881+extern GLXContext glXGetCurrentContext( void );
22882+
22883+extern GLXDrawable glXGetCurrentDrawable( void );
22884+
22885+extern void glXWaitGL( void );
22886+
22887+extern void glXWaitX( void );
22888+
22889+extern void glXUseXFont( Font font, int first, int count, int list );
22890+
22891+
22892+
22893+/* GLX 1.1 and later */
22894+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
22895+
22896+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
22897+
22898+extern const char *glXGetClientString( Display *dpy, int name );
22899+
22900+
22901+/* GLX 1.2 and later */
22902+extern Display *glXGetCurrentDisplay( void );
22903+
22904+
22905+/* GLX 1.3 and later */
22906+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
22907+ const int *attribList, int *nitems );
22908+
22909+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
22910+ int attribute, int *value );
22911+
22912+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
22913+ int *nelements );
22914+
22915+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
22916+ GLXFBConfig config );
22917+
22918+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
22919+ Window win, const int *attribList );
22920+
22921+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
22922+
22923+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
22924+ Pixmap pixmap, const int *attribList );
22925+
22926+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
22927+
22928+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
22929+ const int *attribList );
22930+
22931+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
22932+
22933+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
22934+ unsigned int *value );
22935+
22936+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
22937+ int renderType, GLXContext shareList,
22938+ Bool direct );
22939+
22940+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
22941+ GLXDrawable read, GLXContext ctx );
22942+
22943+extern GLXDrawable glXGetCurrentReadDrawable( void );
22944+
22945+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
22946+ int *value );
22947+
22948+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
22949+ unsigned long mask );
22950+
22951+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
22952+ unsigned long *mask );
22953+
22954+
22955+/* GLX 1.4 and later */
22956+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
22957+
22958+
22959+#ifndef GLX_GLXEXT_LEGACY
22960+
22961+#include <mesa_glxext.h>
22962+
22963+#else
22964+
22965+
22966+
22967+/*
22968+ * ARB 2. GLX_ARB_get_proc_address
22969+ */
22970+#ifndef GLX_ARB_get_proc_address
22971+#define GLX_ARB_get_proc_address 1
22972+
22973+typedef void (*__GLXextFuncPtr)(void);
22974+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
22975+
22976+#endif /* GLX_ARB_get_proc_address */
22977+
22978+
22979+
22980+#endif /* GLX_GLXEXT_LEGACY */
22981+
22982+
22983+/**
22984+ ** The following aren't in glxext.h yet.
22985+ **/
22986+
22987+
22988+/*
22989+ * ???. GLX_NV_vertex_array_range
22990+ */
22991+#ifndef GLX_NV_vertex_array_range
22992+#define GLX_NV_vertex_array_range
22993+
22994+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22995+extern void glXFreeMemoryNV(GLvoid *pointer);
22996+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22997+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
22998+
22999+#endif /* GLX_NV_vertex_array_range */
23000+
23001+
23002+/*
23003+ * ???. GLX_MESA_allocate_memory
23004+ */
23005+#ifndef GLX_MESA_allocate_memory
23006+#define GLX_MESA_allocate_memory 1
23007+
23008+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
23009+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
23010+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
23011+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
23012+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
23013+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
23014+
23015+#endif /* GLX_MESA_allocate_memory */
23016+
23017+
23018+/*
23019+ * ARB ?. GLX_ARB_render_texture
23020+ * XXX This was never finalized!
23021+ */
23022+#ifndef GLX_ARB_render_texture
23023+#define GLX_ARB_render_texture 1
23024+
23025+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
23026+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
23027+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
23028+
23029+#endif /* GLX_ARB_render_texture */
23030+
23031+
23032+#ifndef GLX_ATI_render_texture
23033+#define GLX_ATI_render_texture 1
23034+
23035+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
23036+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
23037+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
23038+
23039+#endif /* GLX_ATI_render_texture */
23040+
23041+
23042+/*
23043+ * Remove this when glxext.h is updated.
23044+ */
23045+#ifndef GLX_NV_float_buffer
23046+#define GLX_NV_float_buffer 1
23047+
23048+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
23049+
23050+#endif /* GLX_NV_float_buffer */
23051+
23052+
23053+
23054+/*
23055+ * #?. GLX_MESA_swap_frame_usage
23056+ */
23057+#ifndef GLX_MESA_swap_frame_usage
23058+#define GLX_MESA_swap_frame_usage 1
23059+
23060+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
23061+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
23062+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
23063+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
23064+
23065+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
23066+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
23067+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
23068+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
23069+
23070+#endif /* GLX_MESA_swap_frame_usage */
23071+
23072+
23073+
23074+/*
23075+ * #?. GLX_MESA_swap_control
23076+ */
23077+#ifndef GLX_MESA_swap_control
23078+#define GLX_MESA_swap_control 1
23079+
23080+extern int glXSwapIntervalMESA(unsigned int interval);
23081+extern int glXGetSwapIntervalMESA(void);
23082+
23083+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
23084+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
23085+
23086+#endif /* GLX_MESA_swap_control */
23087+
23088+
23089+
23090+/*
23091+ * #?. GLX_EXT_texture_from_pixmap
23092+ * XXX not finished?
23093+ */
23094+#ifndef GLX_EXT_texture_from_pixmap
23095+#define GLX_EXT_texture_from_pixmap 1
23096+
23097+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23098+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23099+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23100+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23101+#define GLX_Y_INVERTED_EXT 0x20D4
23102+
23103+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23104+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23105+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23106+
23107+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23108+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23109+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23110+
23111+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23112+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23113+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23114+
23115+#define GLX_TEXTURE_1D_EXT 0x20DB
23116+#define GLX_TEXTURE_2D_EXT 0x20DC
23117+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23118+
23119+#define GLX_FRONT_LEFT_EXT 0x20DE
23120+#define GLX_FRONT_RIGHT_EXT 0x20DF
23121+#define GLX_BACK_LEFT_EXT 0x20E0
23122+#define GLX_BACK_RIGHT_EXT 0x20E1
23123+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23124+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23125+#define GLX_AUX0_EXT 0x20E2
23126+#define GLX_AUX1_EXT 0x20E3
23127+#define GLX_AUX2_EXT 0x20E4
23128+#define GLX_AUX3_EXT 0x20E5
23129+#define GLX_AUX4_EXT 0x20E6
23130+#define GLX_AUX5_EXT 0x20E7
23131+#define GLX_AUX6_EXT 0x20E8
23132+#define GLX_AUX7_EXT 0x20E9
23133+#define GLX_AUX8_EXT 0x20EA
23134+#define GLX_AUX9_EXT 0x20EB
23135+
23136+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23137+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
23138+
23139+#endif /* GLX_EXT_texture_from_pixmap */
23140+
23141+
23142+
23143+
23144+/*** Should these go here, or in another header? */
23145+/*
23146+** GLX Events
23147+*/
23148+typedef struct {
23149+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
23150+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
23151+ unsigned long serial; /* # of last request processed by server */
23152+ Bool send_event; /* true if this came for SendEvent request */
23153+ Display *display; /* display the event was read from */
23154+ GLXDrawable drawable; /* XID of Drawable */
23155+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
23156+ unsigned int aux_buffer; /* which aux buffer was affected */
23157+ int x, y;
23158+ int width, height;
23159+ int count; /* if nonzero, at least this many more */
23160+} GLXPbufferClobberEvent;
23161+
23162+typedef union __GLXEvent {
23163+ GLXPbufferClobberEvent glxpbufferclobber;
23164+ long pad[24];
23165+} GLXEvent;
23166+
23167+#ifdef __cplusplus
23168+}
23169+#endif
23170+
23171+#endif
23172diff --git a/target-i386/mesa_glxext.h b/target-i386/mesa_glxext.h
23173new file mode 100644
23174index 0000000..0f66df6
23175--- /dev/null
23176+++ b/target-i386/mesa_glxext.h
23177@@ -0,0 +1,785 @@
23178+#ifndef __glxext_h_
23179+#define __glxext_h_
23180+
23181+#ifdef __cplusplus
23182+extern "C" {
23183+#endif
23184+
23185+/*
23186+** Copyright (c) 2007 The Khronos Group Inc.
23187+**
23188+** Permission is hereby granted, free of charge, to any person obtaining a
23189+** copy of this software and/or associated documentation files (the
23190+** "Materials"), to deal in the Materials without restriction, including
23191+** without limitation the rights to use, copy, modify, merge, publish,
23192+** distribute, sublicense, and/or sell copies of the Materials, and to
23193+** permit persons to whom the Materials are furnished to do so, subject to
23194+** the following conditions:
23195+**
23196+** The above copyright notice and this permission notice shall be included
23197+** in all copies or substantial portions of the Materials.
23198+**
23199+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23200+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23201+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23202+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23203+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23204+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23205+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23206+*/
23207+
23208+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
23209+#define WIN32_LEAN_AND_MEAN 1
23210+#include <windows.h>
23211+#endif
23212+
23213+#ifndef APIENTRY
23214+#define APIENTRY
23215+#endif
23216+#ifndef APIENTRYP
23217+#define APIENTRYP APIENTRY *
23218+#endif
23219+#ifndef GLAPI
23220+#define GLAPI extern
23221+#endif
23222+
23223+/*************************************************************/
23224+
23225+/* Header file version number, required by OpenGL ABI for Linux */
23226+/* glxext.h last updated 2007/04/21 */
23227+/* Current version at http://www.opengl.org/registry/ */
23228+#define GLX_GLXEXT_VERSION 19
23229+
23230+#ifndef GLX_VERSION_1_3
23231+#define GLX_WINDOW_BIT 0x00000001
23232+#define GLX_PIXMAP_BIT 0x00000002
23233+#define GLX_PBUFFER_BIT 0x00000004
23234+#define GLX_RGBA_BIT 0x00000001
23235+#define GLX_COLOR_INDEX_BIT 0x00000002
23236+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
23237+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
23238+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
23239+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
23240+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
23241+#define GLX_AUX_BUFFERS_BIT 0x00000010
23242+#define GLX_DEPTH_BUFFER_BIT 0x00000020
23243+#define GLX_STENCIL_BUFFER_BIT 0x00000040
23244+#define GLX_ACCUM_BUFFER_BIT 0x00000080
23245+#define GLX_CONFIG_CAVEAT 0x20
23246+#define GLX_X_VISUAL_TYPE 0x22
23247+#define GLX_TRANSPARENT_TYPE 0x23
23248+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
23249+#define GLX_TRANSPARENT_RED_VALUE 0x25
23250+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
23251+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
23252+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
23253+#define GLX_DONT_CARE 0xFFFFFFFF
23254+#define GLX_NONE 0x8000
23255+#define GLX_SLOW_CONFIG 0x8001
23256+#define GLX_TRUE_COLOR 0x8002
23257+#define GLX_DIRECT_COLOR 0x8003
23258+#define GLX_PSEUDO_COLOR 0x8004
23259+#define GLX_STATIC_COLOR 0x8005
23260+#define GLX_GRAY_SCALE 0x8006
23261+#define GLX_STATIC_GRAY 0x8007
23262+#define GLX_TRANSPARENT_RGB 0x8008
23263+#define GLX_TRANSPARENT_INDEX 0x8009
23264+#define GLX_VISUAL_ID 0x800B
23265+#define GLX_SCREEN 0x800C
23266+#define GLX_NON_CONFORMANT_CONFIG 0x800D
23267+#define GLX_DRAWABLE_TYPE 0x8010
23268+#define GLX_RENDER_TYPE 0x8011
23269+#define GLX_X_RENDERABLE 0x8012
23270+#define GLX_FBCONFIG_ID 0x8013
23271+#define GLX_RGBA_TYPE 0x8014
23272+#define GLX_COLOR_INDEX_TYPE 0x8015
23273+#define GLX_MAX_PBUFFER_WIDTH 0x8016
23274+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
23275+#define GLX_MAX_PBUFFER_PIXELS 0x8018
23276+#define GLX_PRESERVED_CONTENTS 0x801B
23277+#define GLX_LARGEST_PBUFFER 0x801C
23278+#define GLX_WIDTH 0x801D
23279+#define GLX_HEIGHT 0x801E
23280+#define GLX_EVENT_MASK 0x801F
23281+#define GLX_DAMAGED 0x8020
23282+#define GLX_SAVED 0x8021
23283+#define GLX_WINDOW 0x8022
23284+#define GLX_PBUFFER 0x8023
23285+#define GLX_PBUFFER_HEIGHT 0x8040
23286+#define GLX_PBUFFER_WIDTH 0x8041
23287+#endif
23288+
23289+#ifndef GLX_VERSION_1_4
23290+#define GLX_SAMPLE_BUFFERS 100000
23291+#define GLX_SAMPLES 100001
23292+#endif
23293+
23294+#ifndef GLX_ARB_get_proc_address
23295+#endif
23296+
23297+#ifndef GLX_ARB_multisample
23298+#define GLX_SAMPLE_BUFFERS_ARB 100000
23299+#define GLX_SAMPLES_ARB 100001
23300+#endif
23301+
23302+#ifndef GLX_ARB_fbconfig_float
23303+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
23304+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
23305+#endif
23306+
23307+#ifndef GLX_SGIS_multisample
23308+#define GLX_SAMPLE_BUFFERS_SGIS 100000
23309+#define GLX_SAMPLES_SGIS 100001
23310+#endif
23311+
23312+#ifndef GLX_EXT_visual_info
23313+#define GLX_X_VISUAL_TYPE_EXT 0x22
23314+#define GLX_TRANSPARENT_TYPE_EXT 0x23
23315+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
23316+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
23317+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
23318+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
23319+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
23320+#define GLX_NONE_EXT 0x8000
23321+#define GLX_TRUE_COLOR_EXT 0x8002
23322+#define GLX_DIRECT_COLOR_EXT 0x8003
23323+#define GLX_PSEUDO_COLOR_EXT 0x8004
23324+#define GLX_STATIC_COLOR_EXT 0x8005
23325+#define GLX_GRAY_SCALE_EXT 0x8006
23326+#define GLX_STATIC_GRAY_EXT 0x8007
23327+#define GLX_TRANSPARENT_RGB_EXT 0x8008
23328+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
23329+#endif
23330+
23331+#ifndef GLX_SGI_swap_control
23332+#endif
23333+
23334+#ifndef GLX_SGI_video_sync
23335+#endif
23336+
23337+#ifndef GLX_SGI_make_current_read
23338+#endif
23339+
23340+#ifndef GLX_SGIX_video_source
23341+#endif
23342+
23343+#ifndef GLX_EXT_visual_rating
23344+#define GLX_VISUAL_CAVEAT_EXT 0x20
23345+#define GLX_SLOW_VISUAL_EXT 0x8001
23346+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
23347+/* reuse GLX_NONE_EXT */
23348+#endif
23349+
23350+#ifndef GLX_EXT_import_context
23351+#define GLX_SHARE_CONTEXT_EXT 0x800A
23352+#define GLX_VISUAL_ID_EXT 0x800B
23353+#define GLX_SCREEN_EXT 0x800C
23354+#endif
23355+
23356+#ifndef GLX_SGIX_fbconfig
23357+#define GLX_WINDOW_BIT_SGIX 0x00000001
23358+#define GLX_PIXMAP_BIT_SGIX 0x00000002
23359+#define GLX_RGBA_BIT_SGIX 0x00000001
23360+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
23361+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
23362+#define GLX_RENDER_TYPE_SGIX 0x8011
23363+#define GLX_X_RENDERABLE_SGIX 0x8012
23364+#define GLX_FBCONFIG_ID_SGIX 0x8013
23365+#define GLX_RGBA_TYPE_SGIX 0x8014
23366+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
23367+/* reuse GLX_SCREEN_EXT */
23368+#endif
23369+
23370+#ifndef GLX_SGIX_pbuffer
23371+#define GLX_PBUFFER_BIT_SGIX 0x00000004
23372+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
23373+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
23374+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
23375+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
23376+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
23377+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
23378+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
23379+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
23380+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
23381+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
23382+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
23383+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
23384+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
23385+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
23386+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
23387+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
23388+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
23389+#define GLX_WIDTH_SGIX 0x801D
23390+#define GLX_HEIGHT_SGIX 0x801E
23391+#define GLX_EVENT_MASK_SGIX 0x801F
23392+#define GLX_DAMAGED_SGIX 0x8020
23393+#define GLX_SAVED_SGIX 0x8021
23394+#define GLX_WINDOW_SGIX 0x8022
23395+#define GLX_PBUFFER_SGIX 0x8023
23396+#endif
23397+
23398+#ifndef GLX_SGI_cushion
23399+#endif
23400+
23401+#ifndef GLX_SGIX_video_resize
23402+#define GLX_SYNC_FRAME_SGIX 0x00000000
23403+#define GLX_SYNC_SWAP_SGIX 0x00000001
23404+#endif
23405+
23406+#ifndef GLX_SGIX_dmbuffer
23407+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
23408+#endif
23409+
23410+#ifndef GLX_SGIX_swap_group
23411+#endif
23412+
23413+#ifndef GLX_SGIX_swap_barrier
23414+#endif
23415+
23416+#ifndef GLX_SGIS_blended_overlay
23417+#define GLX_BLENDED_RGBA_SGIS 0x8025
23418+#endif
23419+
23420+#ifndef GLX_SGIS_shared_multisample
23421+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
23422+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
23423+#endif
23424+
23425+#ifndef GLX_SUN_get_transparent_index
23426+#endif
23427+
23428+#ifndef GLX_3DFX_multisample
23429+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
23430+#define GLX_SAMPLES_3DFX 0x8051
23431+#endif
23432+
23433+#ifndef GLX_MESA_copy_sub_buffer
23434+#endif
23435+
23436+#ifndef GLX_MESA_pixmap_colormap
23437+#endif
23438+
23439+#ifndef GLX_MESA_release_buffers
23440+#endif
23441+
23442+#ifndef GLX_MESA_set_3dfx_mode
23443+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
23444+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
23445+#endif
23446+
23447+#ifndef GLX_SGIX_visual_select_group
23448+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
23449+#endif
23450+
23451+#ifndef GLX_OML_swap_method
23452+#define GLX_SWAP_METHOD_OML 0x8060
23453+#define GLX_SWAP_EXCHANGE_OML 0x8061
23454+#define GLX_SWAP_COPY_OML 0x8062
23455+#define GLX_SWAP_UNDEFINED_OML 0x8063
23456+#endif
23457+
23458+#ifndef GLX_OML_sync_control
23459+#endif
23460+
23461+#ifndef GLX_NV_float_buffer
23462+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
23463+#endif
23464+
23465+#ifndef GLX_SGIX_hyperpipe
23466+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
23467+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
23468+#define GLX_BAD_HYPERPIPE_SGIX 92
23469+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
23470+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
23471+#define GLX_PIPE_RECT_SGIX 0x00000001
23472+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
23473+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
23474+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
23475+#define GLX_HYPERPIPE_ID_SGIX 0x8030
23476+#endif
23477+
23478+#ifndef GLX_MESA_agp_offset
23479+#endif
23480+
23481+#ifndef GLX_EXT_fbconfig_packed_float
23482+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
23483+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
23484+#endif
23485+
23486+#ifndef GLX_EXT_framebuffer_sRGB
23487+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
23488+#endif
23489+
23490+#ifndef GLX_EXT_texture_from_pixmap
23491+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23492+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23493+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23494+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23495+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23496+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23497+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23498+#define GLX_Y_INVERTED_EXT 0x20D4
23499+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23500+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23501+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23502+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23503+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23504+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23505+#define GLX_TEXTURE_1D_EXT 0x20DB
23506+#define GLX_TEXTURE_2D_EXT 0x20DC
23507+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23508+#define GLX_FRONT_LEFT_EXT 0x20DE
23509+#define GLX_FRONT_RIGHT_EXT 0x20DF
23510+#define GLX_BACK_LEFT_EXT 0x20E0
23511+#define GLX_BACK_RIGHT_EXT 0x20E1
23512+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23513+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23514+#define GLX_AUX0_EXT 0x20E2
23515+#define GLX_AUX1_EXT 0x20E3
23516+#define GLX_AUX2_EXT 0x20E4
23517+#define GLX_AUX3_EXT 0x20E5
23518+#define GLX_AUX4_EXT 0x20E6
23519+#define GLX_AUX5_EXT 0x20E7
23520+#define GLX_AUX6_EXT 0x20E8
23521+#define GLX_AUX7_EXT 0x20E9
23522+#define GLX_AUX8_EXT 0x20EA
23523+#define GLX_AUX9_EXT 0x20EB
23524+#endif
23525+
23526+
23527+/*************************************************************/
23528+
23529+#ifndef GLX_ARB_get_proc_address
23530+typedef void (*__GLXextFuncPtr)(void);
23531+#endif
23532+
23533+#ifndef GLX_SGIX_video_source
23534+typedef XID GLXVideoSourceSGIX;
23535+#endif
23536+
23537+#ifndef GLX_SGIX_fbconfig
23538+typedef XID GLXFBConfigIDSGIX;
23539+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
23540+#endif
23541+
23542+#ifndef GLX_SGIX_pbuffer
23543+typedef XID GLXPbufferSGIX;
23544+typedef struct {
23545+ int type;
23546+ unsigned long serial; /* # of last request processed by server */
23547+ Bool send_event; /* true if this came for SendEvent request */
23548+ Display *display; /* display the event was read from */
23549+ GLXDrawable drawable; /* i.d. of Drawable */
23550+ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
23551+ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
23552+ unsigned int mask; /* mask indicating which buffers are affected*/
23553+ int x, y;
23554+ int width, height;
23555+ int count; /* if nonzero, at least this many more */
23556+} GLXBufferClobberEventSGIX;
23557+#endif
23558+
23559+#ifndef GLEXT_64_TYPES_DEFINED
23560+/* This code block is duplicated in glxext.h, so must be protected */
23561+#define GLEXT_64_TYPES_DEFINED
23562+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
23563+/* (as used in the GLX_OML_sync_control extension). */
23564+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
23565+#include <inttypes.h>
23566+#elif defined(__sun__) || defined(__digital__)
23567+#include <inttypes.h>
23568+#if defined(__STDC__)
23569+#if defined(__arch64__)
23570+typedef long int int64_t;
23571+typedef unsigned long int uint64_t;
23572+#else
23573+typedef long long int int64_t;
23574+typedef unsigned long long int uint64_t;
23575+#endif /* __arch64__ */
23576+#endif /* __STDC__ */
23577+#elif defined( __VMS )
23578+#include <inttypes.h>
23579+#elif defined(__SCO__) || defined(__USLC__)
23580+#include <stdint.h>
23581+#elif defined(__UNIXOS2__) || defined(__SOL64__)
23582+typedef long int int32_t;
23583+typedef long long int int64_t;
23584+typedef unsigned long long int uint64_t;
23585+#elif defined(_WIN32) && defined(__GNUC__)
23586+#include <stdint.h>
23587+#elif defined(_WIN32)
23588+typedef __int32 int32_t;
23589+typedef __int64 int64_t;
23590+typedef unsigned __int64 uint64_t;
23591+#else
23592+#include <inttypes.h> /* Fallback option */
23593+#endif
23594+#endif
23595+
23596+#ifndef GLX_VERSION_1_3
23597+#define GLX_VERSION_1_3 1
23598+#ifdef GLX_GLXEXT_PROTOTYPES
23599+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
23600+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
23601+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
23602+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
23603+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
23604+extern void glXDestroyWindow (Display *, GLXWindow);
23605+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
23606+extern void glXDestroyPixmap (Display *, GLXPixmap);
23607+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
23608+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
23609+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
23610+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
23611+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
23612+extern GLXDrawable glXGetCurrentReadDrawable (void);
23613+extern Display * glXGetCurrentDisplay (void);
23614+extern int glXQueryContext (Display *, GLXContext, int, int *);
23615+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
23616+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
23617+#endif /* GLX_GLXEXT_PROTOTYPES */
23618+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
23619+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
23620+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
23621+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
23622+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
23623+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
23624+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
23625+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
23626+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
23627+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
23628+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
23629+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
23630+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23631+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
23632+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
23633+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
23634+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
23635+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
23636+#endif
23637+
23638+#ifndef GLX_VERSION_1_4
23639+#define GLX_VERSION_1_4 1
23640+#ifdef GLX_GLXEXT_PROTOTYPES
23641+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
23642+#endif /* GLX_GLXEXT_PROTOTYPES */
23643+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
23644+#endif
23645+
23646+#ifndef GLX_ARB_get_proc_address
23647+#define GLX_ARB_get_proc_address 1
23648+#ifdef GLX_GLXEXT_PROTOTYPES
23649+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
23650+#endif /* GLX_GLXEXT_PROTOTYPES */
23651+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
23652+#endif
23653+
23654+#ifndef GLX_ARB_multisample
23655+#define GLX_ARB_multisample 1
23656+#endif
23657+
23658+#ifndef GLX_ARB_fbconfig_float
23659+#define GLX_ARB_fbconfig_float 1
23660+#endif
23661+
23662+#ifndef GLX_SGIS_multisample
23663+#define GLX_SGIS_multisample 1
23664+#endif
23665+
23666+#ifndef GLX_EXT_visual_info
23667+#define GLX_EXT_visual_info 1
23668+#endif
23669+
23670+#ifndef GLX_SGI_swap_control
23671+#define GLX_SGI_swap_control 1
23672+#ifdef GLX_GLXEXT_PROTOTYPES
23673+extern int glXSwapIntervalSGI (int);
23674+#endif /* GLX_GLXEXT_PROTOTYPES */
23675+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
23676+#endif
23677+
23678+#ifndef GLX_SGI_video_sync
23679+#define GLX_SGI_video_sync 1
23680+#ifdef GLX_GLXEXT_PROTOTYPES
23681+extern int glXGetVideoSyncSGI (unsigned int *);
23682+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
23683+#endif /* GLX_GLXEXT_PROTOTYPES */
23684+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
23685+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
23686+#endif
23687+
23688+#ifndef GLX_SGI_make_current_read
23689+#define GLX_SGI_make_current_read 1
23690+#ifdef GLX_GLXEXT_PROTOTYPES
23691+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
23692+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
23693+#endif /* GLX_GLXEXT_PROTOTYPES */
23694+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23695+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
23696+#endif
23697+
23698+#ifndef GLX_SGIX_video_source
23699+#define GLX_SGIX_video_source 1
23700+#ifdef _VL_H
23701+#ifdef GLX_GLXEXT_PROTOTYPES
23702+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
23703+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
23704+#endif /* GLX_GLXEXT_PROTOTYPES */
23705+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
23706+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
23707+#endif /* _VL_H */
23708+#endif
23709+
23710+#ifndef GLX_EXT_visual_rating
23711+#define GLX_EXT_visual_rating 1
23712+#endif
23713+
23714+#ifndef GLX_EXT_import_context
23715+#define GLX_EXT_import_context 1
23716+#ifdef GLX_GLXEXT_PROTOTYPES
23717+extern Display * glXGetCurrentDisplayEXT (void);
23718+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
23719+extern GLXContextID glXGetContextIDEXT (const GLXContext);
23720+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
23721+extern void glXFreeContextEXT (Display *, GLXContext);
23722+#endif /* GLX_GLXEXT_PROTOTYPES */
23723+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
23724+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
23725+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
23726+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
23727+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
23728+#endif
23729+
23730+#ifndef GLX_SGIX_fbconfig
23731+#define GLX_SGIX_fbconfig 1
23732+#ifdef GLX_GLXEXT_PROTOTYPES
23733+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
23734+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
23735+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
23736+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
23737+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
23738+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
23739+#endif /* GLX_GLXEXT_PROTOTYPES */
23740+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
23741+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
23742+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
23743+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
23744+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
23745+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
23746+#endif
23747+
23748+#ifndef GLX_SGIX_pbuffer
23749+#define GLX_SGIX_pbuffer 1
23750+#ifdef GLX_GLXEXT_PROTOTYPES
23751+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
23752+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
23753+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
23754+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
23755+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
23756+#endif /* GLX_GLXEXT_PROTOTYPES */
23757+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
23758+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
23759+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
23760+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
23761+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
23762+#endif
23763+
23764+#ifndef GLX_SGI_cushion
23765+#define GLX_SGI_cushion 1
23766+#ifdef GLX_GLXEXT_PROTOTYPES
23767+extern void glXCushionSGI (Display *, Window, float);
23768+#endif /* GLX_GLXEXT_PROTOTYPES */
23769+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
23770+#endif
23771+
23772+#ifndef GLX_SGIX_video_resize
23773+#define GLX_SGIX_video_resize 1
23774+#ifdef GLX_GLXEXT_PROTOTYPES
23775+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
23776+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
23777+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
23778+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
23779+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
23780+#endif /* GLX_GLXEXT_PROTOTYPES */
23781+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
23782+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
23783+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
23784+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
23785+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
23786+#endif
23787+
23788+#ifndef GLX_SGIX_dmbuffer
23789+#define GLX_SGIX_dmbuffer 1
23790+#ifdef _DM_BUFFER_H_
23791+#ifdef GLX_GLXEXT_PROTOTYPES
23792+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
23793+#endif /* GLX_GLXEXT_PROTOTYPES */
23794+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
23795+#endif /* _DM_BUFFER_H_ */
23796+#endif
23797+
23798+#ifndef GLX_SGIX_swap_group
23799+#define GLX_SGIX_swap_group 1
23800+#ifdef GLX_GLXEXT_PROTOTYPES
23801+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
23802+#endif /* GLX_GLXEXT_PROTOTYPES */
23803+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
23804+#endif
23805+
23806+#ifndef GLX_SGIX_swap_barrier
23807+#define GLX_SGIX_swap_barrier 1
23808+#ifdef GLX_GLXEXT_PROTOTYPES
23809+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
23810+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
23811+#endif /* GLX_GLXEXT_PROTOTYPES */
23812+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
23813+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
23814+#endif
23815+
23816+#ifndef GLX_SUN_get_transparent_index
23817+#define GLX_SUN_get_transparent_index 1
23818+#ifdef GLX_GLXEXT_PROTOTYPES
23819+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
23820+#endif /* GLX_GLXEXT_PROTOTYPES */
23821+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
23822+#endif
23823+
23824+#ifndef GLX_MESA_copy_sub_buffer
23825+#define GLX_MESA_copy_sub_buffer 1
23826+#ifdef GLX_GLXEXT_PROTOTYPES
23827+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
23828+#endif /* GLX_GLXEXT_PROTOTYPES */
23829+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
23830+#endif
23831+
23832+#ifndef GLX_MESA_pixmap_colormap
23833+#define GLX_MESA_pixmap_colormap 1
23834+#ifdef GLX_GLXEXT_PROTOTYPES
23835+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
23836+#endif /* GLX_GLXEXT_PROTOTYPES */
23837+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
23838+#endif
23839+
23840+#ifndef GLX_MESA_release_buffers
23841+#define GLX_MESA_release_buffers 1
23842+#ifdef GLX_GLXEXT_PROTOTYPES
23843+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
23844+#endif /* GLX_GLXEXT_PROTOTYPES */
23845+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
23846+#endif
23847+
23848+#ifndef GLX_MESA_set_3dfx_mode
23849+#define GLX_MESA_set_3dfx_mode 1
23850+#ifdef GLX_GLXEXT_PROTOTYPES
23851+extern Bool glXSet3DfxModeMESA (int);
23852+#endif /* GLX_GLXEXT_PROTOTYPES */
23853+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
23854+#endif
23855+
23856+#ifndef GLX_SGIX_visual_select_group
23857+#define GLX_SGIX_visual_select_group 1
23858+#endif
23859+
23860+#ifndef GLX_OML_swap_method
23861+#define GLX_OML_swap_method 1
23862+#endif
23863+
23864+#ifndef GLX_OML_sync_control
23865+#define GLX_OML_sync_control 1
23866+#ifdef GLX_GLXEXT_PROTOTYPES
23867+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
23868+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
23869+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
23870+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
23871+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
23872+#endif /* GLX_GLXEXT_PROTOTYPES */
23873+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
23874+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
23875+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
23876+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);
23877+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
23878+#endif
23879+
23880+#ifndef GLX_NV_float_buffer
23881+#define GLX_NV_float_buffer 1
23882+#endif
23883+
23884+#ifndef GLX_SGIX_hyperpipe
23885+#define GLX_SGIX_hyperpipe 1
23886+
23887+typedef struct {
23888+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23889+ int networkId;
23890+} GLXHyperpipeNetworkSGIX;
23891+
23892+typedef struct {
23893+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23894+ int channel;
23895+ unsigned int
23896+ participationType;
23897+ int timeSlice;
23898+} GLXHyperpipeConfigSGIX;
23899+
23900+typedef struct {
23901+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23902+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
23903+ int destXOrigin, destYOrigin, destWidth, destHeight;
23904+} GLXPipeRect;
23905+
23906+typedef struct {
23907+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23908+ int XOrigin, YOrigin, maxHeight, maxWidth;
23909+} GLXPipeRectLimits;
23910+
23911+#ifdef GLX_GLXEXT_PROTOTYPES
23912+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
23913+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
23914+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
23915+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
23916+extern int glXBindHyperpipeSGIX (Display *, int);
23917+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
23918+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
23919+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
23920+#endif /* GLX_GLXEXT_PROTOTYPES */
23921+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
23922+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
23923+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
23924+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
23925+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
23926+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
23927+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
23928+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
23929+#endif
23930+
23931+#ifndef GLX_MESA_agp_offset
23932+#define GLX_MESA_agp_offset 1
23933+#ifdef GLX_GLXEXT_PROTOTYPES
23934+extern unsigned int glXGetAGPOffsetMESA (const void *);
23935+#endif /* GLX_GLXEXT_PROTOTYPES */
23936+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
23937+#endif
23938+
23939+#ifndef GLX_EXT_fbconfig_packed_float
23940+#define GLX_EXT_fbconfig_packed_float 1
23941+#endif
23942+
23943+#ifndef GLX_EXT_framebuffer_sRGB
23944+#define GLX_EXT_framebuffer_sRGB 1
23945+#endif
23946+
23947+#ifndef GLX_EXT_texture_from_pixmap
23948+#define GLX_EXT_texture_from_pixmap 1
23949+#ifdef GLX_GLXEXT_PROTOTYPES
23950+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
23951+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
23952+#endif /* GLX_GLXEXT_PROTOTYPES */
23953+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23954+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
23955+#endif
23956+
23957+
23958+#ifdef __cplusplus
23959+}
23960+#endif
23961+
23962+#endif
23963diff --git a/target-i386/mesa_mipmap.c b/target-i386/mesa_mipmap.c
23964new file mode 100644
23965index 0000000..f623ea1
23966--- /dev/null
23967+++ b/target-i386/mesa_mipmap.c
23968@@ -0,0 +1,824 @@
23969+
23970+/*
23971+ * Mesa 3-D graphics library
23972+ * Version: 3.4
23973+ * Copyright (C) 1995-2000 Brian Paul
23974+ *
23975+ * This library is free software; you can redistribute it and/or
23976+ * modify it under the terms of the GNU Library General Public
23977+ * License as published by the Free Software Foundation; either
23978+ * version 2 of the License, or (at your option) any later version.
23979+ *
23980+ * This library is distributed in the hope that it will be useful,
23981+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23982+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23983+ * Library General Public License for more details.
23984+ *
23985+ * You should have received a copy of the GNU Library General Public
23986+ * License along with this library; if not, write to the Free
23987+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23988+ */
23989+
23990+
23991+#ifdef PC_HEADER
23992+#include "all.h"
23993+#else
23994+#include <assert.h>
23995+#include <math.h>
23996+#include <stdio.h>
23997+#include <stdlib.h>
23998+//#include "gluP.h"
23999+#endif
24000+
24001+
24002+/*
24003+ * Compute ceiling of integer quotient of A divided by B:
24004+ */
24005+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
24006+
24007+
24008+
24009+#ifdef EPSILON
24010+#undef EPSILON
24011+#endif
24012+#define EPSILON 0.001
24013+
24014+
24015+/* To work around optimizer bug in MSVC4.1 */
24016+#if defined(__WIN32__) && !defined(OPENSTEP)
24017+void
24018+dummy(GLuint j, GLuint k)
24019+{
24020+}
24021+#else
24022+#define dummy(J, K)
24023+#endif
24024+
24025+
24026+static GLint GLAPIENTRY
24027+mesa_gluScaleImage(GLenum format,
24028+ GLsizei widthin, GLsizei heightin,
24029+ GLenum typein, const void *datain,
24030+ GLsizei widthout, GLsizei heightout,
24031+ GLenum typeout, void *dataout)
24032+{
24033+ GLint components, i, j, k;
24034+ GLfloat *tempin, *tempout;
24035+ GLfloat sx, sy;
24036+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24037+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24038+ GLint sizein, sizeout;
24039+ GLint rowstride, rowlen;
24040+
24041+
24042+ /* Determine number of components per pixel */
24043+ switch (format) {
24044+ case GL_COLOR_INDEX:
24045+ case GL_STENCIL_INDEX:
24046+ case GL_DEPTH_COMPONENT:
24047+ case GL_RED:
24048+ case GL_GREEN:
24049+ case GL_BLUE:
24050+ case GL_ALPHA:
24051+ case GL_LUMINANCE:
24052+ components = 1;
24053+ break;
24054+ case GL_LUMINANCE_ALPHA:
24055+ components = 2;
24056+ break;
24057+ case GL_RGB:
24058+ case GL_BGR:
24059+ components = 3;
24060+ break;
24061+ case GL_RGBA:
24062+ case GL_BGRA:
24063+#ifdef GL_EXT_abgr
24064+ case GL_ABGR_EXT:
24065+#endif
24066+ components = 4;
24067+ break;
24068+ default:
24069+ return GLU_INVALID_ENUM;
24070+ }
24071+
24072+ /* Determine bytes per input datum */
24073+ switch (typein) {
24074+ case GL_UNSIGNED_BYTE:
24075+ sizein = sizeof(GLubyte);
24076+ break;
24077+ case GL_BYTE:
24078+ sizein = sizeof(GLbyte);
24079+ break;
24080+ case GL_UNSIGNED_SHORT:
24081+ sizein = sizeof(GLushort);
24082+ break;
24083+ case GL_SHORT:
24084+ sizein = sizeof(GLshort);
24085+ break;
24086+ case GL_UNSIGNED_INT:
24087+ sizein = sizeof(GLuint);
24088+ break;
24089+ case GL_INT:
24090+ sizein = sizeof(GLint);
24091+ break;
24092+ case GL_FLOAT:
24093+ sizein = sizeof(GLfloat);
24094+ break;
24095+ case GL_BITMAP:
24096+ /* not implemented yet */
24097+ default:
24098+ return GL_INVALID_ENUM;
24099+ }
24100+
24101+ /* Determine bytes per output datum */
24102+ switch (typeout) {
24103+ case GL_UNSIGNED_BYTE:
24104+ sizeout = sizeof(GLubyte);
24105+ break;
24106+ case GL_BYTE:
24107+ sizeout = sizeof(GLbyte);
24108+ break;
24109+ case GL_UNSIGNED_SHORT:
24110+ sizeout = sizeof(GLushort);
24111+ break;
24112+ case GL_SHORT:
24113+ sizeout = sizeof(GLshort);
24114+ break;
24115+ case GL_UNSIGNED_INT:
24116+ sizeout = sizeof(GLuint);
24117+ break;
24118+ case GL_INT:
24119+ sizeout = sizeof(GLint);
24120+ break;
24121+ case GL_FLOAT:
24122+ sizeout = sizeof(GLfloat);
24123+ break;
24124+ case GL_BITMAP:
24125+ /* not implemented yet */
24126+ default:
24127+ return GL_INVALID_ENUM;
24128+ }
24129+
24130+ /* Get glPixelStore state */
24131+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24132+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24133+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24134+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24135+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24136+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24137+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24138+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24139+
24140+ /* Allocate storage for intermediate images */
24141+ tempin = (GLfloat *) malloc(widthin * heightin
24142+ * components * sizeof(GLfloat));
24143+ if (!tempin) {
24144+ return GLU_OUT_OF_MEMORY;
24145+ }
24146+ tempout = (GLfloat *) malloc(widthout * heightout
24147+ * components * sizeof(GLfloat));
24148+ if (!tempout) {
24149+ free(tempin);
24150+ return GLU_OUT_OF_MEMORY;
24151+ }
24152+
24153+
24154+ /*
24155+ * Unpack the pixel data and convert to floating point
24156+ */
24157+
24158+ if (unpackrowlength > 0) {
24159+ rowlen = unpackrowlength;
24160+ }
24161+ else {
24162+ rowlen = widthin;
24163+ }
24164+ if (sizein >= unpackalignment) {
24165+ rowstride = components * rowlen;
24166+ }
24167+ else {
24168+ rowstride = unpackalignment / sizein
24169+ * CEILING(components * rowlen * sizein, unpackalignment);
24170+ }
24171+
24172+ switch (typein) {
24173+ case GL_UNSIGNED_BYTE:
24174+ k = 0;
24175+ for (i = 0; i < heightin; i++) {
24176+ GLubyte *ubptr = (GLubyte *) datain
24177+ + i * rowstride
24178+ + unpackskiprows * rowstride + unpackskippixels * components;
24179+ for (j = 0; j < widthin * components; j++) {
24180+ dummy(j, k);
24181+ tempin[k++] = (GLfloat) * ubptr++;
24182+ }
24183+ }
24184+ break;
24185+ case GL_BYTE:
24186+ k = 0;
24187+ for (i = 0; i < heightin; i++) {
24188+ GLbyte *bptr = (GLbyte *) datain
24189+ + i * rowstride
24190+ + unpackskiprows * rowstride + unpackskippixels * components;
24191+ for (j = 0; j < widthin * components; j++) {
24192+ dummy(j, k);
24193+ tempin[k++] = (GLfloat) * bptr++;
24194+ }
24195+ }
24196+ break;
24197+ case GL_UNSIGNED_SHORT:
24198+ k = 0;
24199+ for (i = 0; i < heightin; i++) {
24200+ GLushort *usptr = (GLushort *) datain
24201+ + i * rowstride
24202+ + unpackskiprows * rowstride + unpackskippixels * components;
24203+ for (j = 0; j < widthin * components; j++) {
24204+ dummy(j, k);
24205+ tempin[k++] = (GLfloat) * usptr++;
24206+ }
24207+ }
24208+ break;
24209+ case GL_SHORT:
24210+ k = 0;
24211+ for (i = 0; i < heightin; i++) {
24212+ GLshort *sptr = (GLshort *) datain
24213+ + i * rowstride
24214+ + unpackskiprows * rowstride + unpackskippixels * components;
24215+ for (j = 0; j < widthin * components; j++) {
24216+ dummy(j, k);
24217+ tempin[k++] = (GLfloat) * sptr++;
24218+ }
24219+ }
24220+ break;
24221+ case GL_UNSIGNED_INT:
24222+ k = 0;
24223+ for (i = 0; i < heightin; i++) {
24224+ GLuint *uiptr = (GLuint *) datain
24225+ + i * rowstride
24226+ + unpackskiprows * rowstride + unpackskippixels * components;
24227+ for (j = 0; j < widthin * components; j++) {
24228+ dummy(j, k);
24229+ tempin[k++] = (GLfloat) * uiptr++;
24230+ }
24231+ }
24232+ break;
24233+ case GL_INT:
24234+ k = 0;
24235+ for (i = 0; i < heightin; i++) {
24236+ GLint *iptr = (GLint *) datain
24237+ + i * rowstride
24238+ + unpackskiprows * rowstride + unpackskippixels * components;
24239+ for (j = 0; j < widthin * components; j++) {
24240+ dummy(j, k);
24241+ tempin[k++] = (GLfloat) * iptr++;
24242+ }
24243+ }
24244+ break;
24245+ case GL_FLOAT:
24246+ k = 0;
24247+ for (i = 0; i < heightin; i++) {
24248+ GLfloat *fptr = (GLfloat *) datain
24249+ + i * rowstride
24250+ + unpackskiprows * rowstride + unpackskippixels * components;
24251+ for (j = 0; j < widthin * components; j++) {
24252+ dummy(j, k);
24253+ tempin[k++] = *fptr++;
24254+ }
24255+ }
24256+ break;
24257+ default:
24258+ return GLU_INVALID_ENUM;
24259+ }
24260+
24261+
24262+ /*
24263+ * Scale the image!
24264+ */
24265+
24266+ if (widthout > 1)
24267+ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
24268+ else
24269+ sx = (GLfloat) (widthin - 1);
24270+ if (heightout > 1)
24271+ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
24272+ else
24273+ sy = (GLfloat) (heightin - 1);
24274+
24275+/*#define POINT_SAMPLE*/
24276+#ifdef POINT_SAMPLE
24277+ for (i = 0; i < heightout; i++) {
24278+ GLint ii = i * sy;
24279+ for (j = 0; j < widthout; j++) {
24280+ GLint jj = j * sx;
24281+
24282+ GLfloat *src = tempin + (ii * widthin + jj) * components;
24283+ GLfloat *dst = tempout + (i * widthout + j) * components;
24284+
24285+ for (k = 0; k < components; k++) {
24286+ *dst++ = *src++;
24287+ }
24288+ }
24289+ }
24290+#else
24291+ if (sx < 1.0 && sy < 1.0) {
24292+ /* magnify both width and height: use weighted sample of 4 pixels */
24293+ GLint i0, i1, j0, j1;
24294+ GLfloat alpha, beta;
24295+ GLfloat *src00, *src01, *src10, *src11;
24296+ GLfloat s1, s2;
24297+ GLfloat *dst;
24298+
24299+ for (i = 0; i < heightout; i++) {
24300+ i0 = i * sy;
24301+ i1 = i0 + 1;
24302+ if (i1 >= heightin)
24303+ i1 = heightin - 1;
24304+/* i1 = (i+1) * sy - EPSILON;*/
24305+ alpha = i * sy - i0;
24306+ for (j = 0; j < widthout; j++) {
24307+ j0 = j * sx;
24308+ j1 = j0 + 1;
24309+ if (j1 >= widthin)
24310+ j1 = widthin - 1;
24311+/* j1 = (j+1) * sx - EPSILON; */
24312+ beta = j * sx - j0;
24313+
24314+ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
24315+ src00 = tempin + (i0 * widthin + j0) * components;
24316+ src01 = tempin + (i0 * widthin + j1) * components;
24317+ src10 = tempin + (i1 * widthin + j0) * components;
24318+ src11 = tempin + (i1 * widthin + j1) * components;
24319+
24320+ dst = tempout + (i * widthout + j) * components;
24321+
24322+ for (k = 0; k < components; k++) {
24323+ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
24324+ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
24325+ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
24326+ }
24327+ }
24328+ }
24329+ }
24330+ else {
24331+ /* shrink width and/or height: use an unweighted box filter */
24332+ GLint i0, i1;
24333+ GLint j0, j1;
24334+ GLint ii, jj;
24335+ GLfloat sum, *dst;
24336+
24337+ for (i = 0; i < heightout; i++) {
24338+ i0 = i * sy;
24339+ i1 = i0 + 1;
24340+ if (i1 >= heightin)
24341+ i1 = heightin - 1;
24342+/* i1 = (i+1) * sy - EPSILON; */
24343+ for (j = 0; j < widthout; j++) {
24344+ j0 = j * sx;
24345+ j1 = j0 + 1;
24346+ if (j1 >= widthin)
24347+ j1 = widthin - 1;
24348+/* j1 = (j+1) * sx - EPSILON; */
24349+
24350+ dst = tempout + (i * widthout + j) * components;
24351+
24352+ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
24353+ for (k = 0; k < components; k++) {
24354+ sum = 0.0;
24355+ for (ii = i0; ii <= i1; ii++) {
24356+ for (jj = j0; jj <= j1; jj++) {
24357+ sum += *(tempin + (ii * widthin + jj) * components + k);
24358+ }
24359+ }
24360+ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
24361+ *dst++ = sum;
24362+ }
24363+ }
24364+ }
24365+ }
24366+#endif
24367+
24368+
24369+ /*
24370+ * Return output image
24371+ */
24372+
24373+ if (packrowlength > 0) {
24374+ rowlen = packrowlength;
24375+ }
24376+ else {
24377+ rowlen = widthout;
24378+ }
24379+ if (sizeout >= packalignment) {
24380+ rowstride = components * rowlen;
24381+ }
24382+ else {
24383+ rowstride = packalignment / sizeout
24384+ * CEILING(components * rowlen * sizeout, packalignment);
24385+ }
24386+
24387+ switch (typeout) {
24388+ case GL_UNSIGNED_BYTE:
24389+ k = 0;
24390+ for (i = 0; i < heightout; i++) {
24391+ GLubyte *ubptr = (GLubyte *) dataout
24392+ + i * rowstride
24393+ + packskiprows * rowstride + packskippixels * components;
24394+ for (j = 0; j < widthout * components; j++) {
24395+ dummy(j, k + i);
24396+ *ubptr++ = (GLubyte) tempout[k++];
24397+ }
24398+ }
24399+ break;
24400+ case GL_BYTE:
24401+ k = 0;
24402+ for (i = 0; i < heightout; i++) {
24403+ GLbyte *bptr = (GLbyte *) dataout
24404+ + i * rowstride
24405+ + packskiprows * rowstride + packskippixels * components;
24406+ for (j = 0; j < widthout * components; j++) {
24407+ dummy(j, k + i);
24408+ *bptr++ = (GLbyte) tempout[k++];
24409+ }
24410+ }
24411+ break;
24412+ case GL_UNSIGNED_SHORT:
24413+ k = 0;
24414+ for (i = 0; i < heightout; i++) {
24415+ GLushort *usptr = (GLushort *) dataout
24416+ + i * rowstride
24417+ + packskiprows * rowstride + packskippixels * components;
24418+ for (j = 0; j < widthout * components; j++) {
24419+ dummy(j, k + i);
24420+ *usptr++ = (GLushort) tempout[k++];
24421+ }
24422+ }
24423+ break;
24424+ case GL_SHORT:
24425+ k = 0;
24426+ for (i = 0; i < heightout; i++) {
24427+ GLshort *sptr = (GLshort *) dataout
24428+ + i * rowstride
24429+ + packskiprows * rowstride + packskippixels * components;
24430+ for (j = 0; j < widthout * components; j++) {
24431+ dummy(j, k + i);
24432+ *sptr++ = (GLshort) tempout[k++];
24433+ }
24434+ }
24435+ break;
24436+ case GL_UNSIGNED_INT:
24437+ k = 0;
24438+ for (i = 0; i < heightout; i++) {
24439+ GLuint *uiptr = (GLuint *) dataout
24440+ + i * rowstride
24441+ + packskiprows * rowstride + packskippixels * components;
24442+ for (j = 0; j < widthout * components; j++) {
24443+ dummy(j, k + i);
24444+ *uiptr++ = (GLuint) tempout[k++];
24445+ }
24446+ }
24447+ break;
24448+ case GL_INT:
24449+ k = 0;
24450+ for (i = 0; i < heightout; i++) {
24451+ GLint *iptr = (GLint *) dataout
24452+ + i * rowstride
24453+ + packskiprows * rowstride + packskippixels * components;
24454+ for (j = 0; j < widthout * components; j++) {
24455+ dummy(j, k + i);
24456+ *iptr++ = (GLint) tempout[k++];
24457+ }
24458+ }
24459+ break;
24460+ case GL_FLOAT:
24461+ k = 0;
24462+ for (i = 0; i < heightout; i++) {
24463+ GLfloat *fptr = (GLfloat *) dataout
24464+ + i * rowstride
24465+ + packskiprows * rowstride + packskippixels * components;
24466+ for (j = 0; j < widthout * components; j++) {
24467+ dummy(j, k + i);
24468+ *fptr++ = tempout[k++];
24469+ }
24470+ }
24471+ break;
24472+ default:
24473+ return GLU_INVALID_ENUM;
24474+ }
24475+
24476+
24477+ /* free temporary image storage */
24478+ free(tempin);
24479+ free(tempout);
24480+
24481+ return 0;
24482+}
24483+
24484+
24485+
24486+/*
24487+ * Return the largest k such that 2^k <= n.
24488+ */
24489+static GLint
24490+ilog2(GLint n)
24491+{
24492+ GLint k;
24493+
24494+ if (n <= 0)
24495+ return 0;
24496+ for (k = 0; n >>= 1; k++);
24497+ return k;
24498+}
24499+
24500+
24501+
24502+/*
24503+ * Find the value nearest to n which is also a power of two.
24504+ */
24505+static GLint
24506+round2(GLint n)
24507+{
24508+ GLint m;
24509+
24510+ for (m = 1; m < n; m *= 2);
24511+
24512+ /* m>=n */
24513+ if (m - n <= n - m / 2) {
24514+ return m;
24515+ }
24516+ else {
24517+ return m / 2;
24518+ }
24519+}
24520+
24521+
24522+/*
24523+ * Given an pixel format and datatype, return the number of bytes to
24524+ * store one pixel.
24525+ */
24526+static GLint
24527+bytes_per_pixel(GLenum format, GLenum type)
24528+{
24529+ GLint n, m;
24530+
24531+ switch (format) {
24532+ case GL_COLOR_INDEX:
24533+ case GL_STENCIL_INDEX:
24534+ case GL_DEPTH_COMPONENT:
24535+ case GL_RED:
24536+ case GL_GREEN:
24537+ case GL_BLUE:
24538+ case GL_ALPHA:
24539+ case GL_LUMINANCE:
24540+ n = 1;
24541+ break;
24542+ case GL_LUMINANCE_ALPHA:
24543+ n = 2;
24544+ break;
24545+ case GL_RGB:
24546+ case GL_BGR:
24547+ n = 3;
24548+ break;
24549+ case GL_RGBA:
24550+ case GL_BGRA:
24551+#ifdef GL_EXT_abgr
24552+ case GL_ABGR_EXT:
24553+#endif
24554+ n = 4;
24555+ break;
24556+ default:
24557+ n = 0;
24558+ }
24559+
24560+ switch (type) {
24561+ case GL_UNSIGNED_BYTE:
24562+ m = sizeof(GLubyte);
24563+ break;
24564+ case GL_BYTE:
24565+ m = sizeof(GLbyte);
24566+ break;
24567+ case GL_BITMAP:
24568+ m = 1;
24569+ break;
24570+ case GL_UNSIGNED_SHORT:
24571+ m = sizeof(GLushort);
24572+ break;
24573+ case GL_SHORT:
24574+ m = sizeof(GLshort);
24575+ break;
24576+ case GL_UNSIGNED_INT:
24577+ m = sizeof(GLuint);
24578+ break;
24579+ case GL_INT:
24580+ m = sizeof(GLint);
24581+ break;
24582+ case GL_FLOAT:
24583+ m = sizeof(GLfloat);
24584+ break;
24585+ default:
24586+ m = 0;
24587+ }
24588+
24589+ return n * m;
24590+}
24591+
24592+
24593+
24594+/*
24595+ * WARNING: This function isn't finished and has never been tested!!!!
24596+ */
24597+GLint GLAPIENTRY
24598+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
24599+ GLsizei width, GLenum format, GLenum type, const void *data)
24600+{
24601+ GLubyte *texture;
24602+ GLint levels, max_levels;
24603+ GLint new_width, max_width;
24604+ GLint i, j, k, l;
24605+
24606+ if (width < 1)
24607+ return GLU_INVALID_VALUE;
24608+
24609+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
24610+ max_levels = ilog2(max_width) + 1;
24611+
24612+ /* Compute how many mipmap images to make */
24613+ levels = ilog2(width) + 1;
24614+ if (levels > max_levels) {
24615+ levels = max_levels;
24616+ }
24617+
24618+ new_width = 1 << (levels - 1);
24619+
24620+ texture = (GLubyte *) malloc(new_width * components);
24621+ if (!texture) {
24622+ return GLU_OUT_OF_MEMORY;
24623+ }
24624+
24625+ if (width != new_width) {
24626+ /* initial rescaling */
24627+ switch (type) {
24628+ case GL_UNSIGNED_BYTE:
24629+ {
24630+ GLubyte *ub_data = (GLubyte *) data;
24631+ for (i = 0; i < new_width; i++) {
24632+ j = i * width / new_width;
24633+ for (k = 0; k < components; k++) {
24634+ texture[i * components + k] = ub_data[j * components + k];
24635+ }
24636+ }
24637+ }
24638+ break;
24639+ default:
24640+ /* Not implemented */
24641+ return GLU_ERROR;
24642+ }
24643+ }
24644+
24645+ /* generate and load mipmap images */
24646+ for (l = 0; l < levels; l++) {
24647+ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
24648+ format, GL_UNSIGNED_BYTE, texture);
24649+
24650+ /* Scale image down to 1/2 size */
24651+ new_width = new_width / 2;
24652+ for (i = 0; i < new_width; i++) {
24653+ for (k = 0; k < components; k++) {
24654+ GLint sample1, sample2;
24655+ sample1 = (GLint) texture[i * 2 * components + k];
24656+ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
24657+ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
24658+ }
24659+ }
24660+ }
24661+
24662+ free(texture);
24663+
24664+ return 0;
24665+}
24666+
24667+
24668+
24669+GLint GLAPIENTRY
24670+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
24671+ GLsizei width, GLsizei height, GLenum format,
24672+ GLenum type, const void *data)
24673+{
24674+ GLint w, h, maxsize;
24675+ void *image, *newimage;
24676+ GLint neww, newh, level, bpp;
24677+ int error;
24678+ GLboolean done;
24679+ GLint retval = 0;
24680+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24681+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24682+
24683+ if (width < 1 || height < 1)
24684+ return GLU_INVALID_VALUE;
24685+
24686+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
24687+
24688+ w = round2(width);
24689+ if (w > maxsize) {
24690+ w = maxsize;
24691+ }
24692+ h = round2(height);
24693+ if (h > maxsize) {
24694+ h = maxsize;
24695+ }
24696+
24697+ bpp = bytes_per_pixel(format, type);
24698+ if (bpp == 0) {
24699+ /* probably a bad format or type enum */
24700+ return GLU_INVALID_ENUM;
24701+ }
24702+
24703+ /* Get current glPixelStore values */
24704+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24705+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24706+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24707+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24708+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24709+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24710+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24711+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24712+
24713+ /* set pixel packing */
24714+ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
24715+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
24716+ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
24717+ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
24718+
24719+ done = GL_FALSE;
24720+
24721+ if (w != width || h != height) {
24722+ /* must rescale image to get "top" mipmap texture image */
24723+ image = malloc((w + 4) * h * bpp);
24724+ if (!image) {
24725+ return GLU_OUT_OF_MEMORY;
24726+ }
24727+ error = mesa_gluScaleImage(format, width, height, type, data,
24728+ w, h, type, image);
24729+ if (error) {
24730+ retval = error;
24731+ done = GL_TRUE;
24732+ }
24733+ }
24734+ else {
24735+ image = (void *) data;
24736+ }
24737+
24738+ level = 0;
24739+ while (!done) {
24740+ if (image != data) {
24741+ /* set pixel unpacking */
24742+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
24743+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
24744+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
24745+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
24746+ }
24747+
24748+ glTexImage2D(target, level, components, w, h, 0, format, type, image);
24749+
24750+ if (w == 1 && h == 1)
24751+ break;
24752+
24753+ neww = (w < 2) ? 1 : w / 2;
24754+ newh = (h < 2) ? 1 : h / 2;
24755+ newimage = malloc((neww + 4) * newh * bpp);
24756+ if (!newimage) {
24757+ return GLU_OUT_OF_MEMORY;
24758+ }
24759+
24760+ error = mesa_gluScaleImage(format, w, h, type, image,
24761+ neww, newh, type, newimage);
24762+ if (error) {
24763+ retval = error;
24764+ done = GL_TRUE;
24765+ }
24766+
24767+ if (image != data) {
24768+ free(image);
24769+ }
24770+ image = newimage;
24771+
24772+ w = neww;
24773+ h = newh;
24774+ level++;
24775+ }
24776+
24777+ if (image != data) {
24778+ free(image);
24779+ }
24780+
24781+ /* Restore original glPixelStore state */
24782+ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
24783+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
24784+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
24785+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
24786+ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
24787+ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
24788+ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
24789+ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
24790+
24791+ return retval;
24792+}
24793diff --git a/target-i386/opengl_exec.c b/target-i386/opengl_exec.c
24794new file mode 100644
24795index 0000000..4a69b9b
24796--- /dev/null
24797+++ b/target-i386/opengl_exec.c
24798@@ -0,0 +1,3931 @@
24799+/*
24800+ * Host-side implementation of GL/GLX API
24801+ *
24802+ * Copyright (c) 2006,2007 Even Rouault
24803+ *
24804+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24805+ * of this software and associated documentation files (the "Software"), to deal
24806+ * in the Software without restriction, including without limitation the rights
24807+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24808+ * copies of the Software, and to permit persons to whom the Software is
24809+ * furnished to do so, subject to the following conditions:
24810+ *
24811+ * The above copyright notice and this permission notice shall be included in
24812+ * all copies or substantial portions of the Software.
24813+ *
24814+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24815+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24816+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24817+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24818+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24819+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24820+ * THE SOFTWARE.
24821+ */
24822+
24823+
24824+#include <stdio.h>
24825+#include <stdlib.h>
24826+#include <assert.h>
24827+#include <string.h>
24828+
24829+#include <X11/Xlib.h>
24830+#include <X11/Xutil.h>
24831+
24832+#define GL_GLEXT_PROTOTYPES
24833+#define GLX_GLXEXT_PROTOTYPES
24834+
24835+#include <mesa_gl.h>
24836+#include <mesa_glx.h>
24837+
24838+// TODO
24839+typedef long unsigned int target_phys_addr_t;
24840+
24841+#include "opengl_func.h"
24842+
24843+#include "mesa_glu.h"
24844+#include "mesa_mipmap.c"
24845+
24846+#include "../qemu-common.h"
24847+
24848+//#define SYSTEMATIC_ERROR_CHECK
24849+#define BUFFER_BEGINEND
24850+#define glGetError() 0
24851+
24852+#define GET_EXT_PTR(type, funcname, args_decl) \
24853+ static int detect_##funcname = 0; \
24854+ static type(*ptr_func_##funcname)args_decl = NULL; \
24855+ if (detect_##funcname == 0) \
24856+ { \
24857+ detect_##funcname = 1; \
24858+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24859+ assert (ptr_func_##funcname); \
24860+ }
24861+
24862+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
24863+ static int detect_##funcname = 0; \
24864+ static type(*ptr_func_##funcname)args_decl = NULL; \
24865+ if (detect_##funcname == 0) \
24866+ { \
24867+ detect_##funcname = 1; \
24868+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24869+ }
24870+
24871+#ifndef WIN32
24872+#include <dlfcn.h>
24873+#endif
24874+
24875+static void *get_glu_ptr(const char *name)
24876+{
24877+ static void *handle = (void *) -1;
24878+
24879+ if (handle == (void *) -1) {
24880+#ifndef WIN32
24881+ handle = dlopen("libGLU.so", RTLD_LAZY);
24882+ if (!handle)
24883+ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
24884+#else
24885+ handle = (void *) LoadLibrary("glu32.dll");
24886+ if (!handle)
24887+ fprintf(stderr, "can't load glu32.dll\n");
24888+#endif
24889+ }
24890+ if (handle) {
24891+#ifndef WIN32
24892+ return dlsym(handle, name);
24893+#else
24894+ return GetProcAddress(handle, name);
24895+#endif
24896+ }
24897+ return NULL;
24898+}
24899+
24900+#define GET_GLU_PTR(type, funcname, args_decl) \
24901+ static int detect_##funcname = 0; \
24902+ static type(*ptr_func_##funcname)args_decl = NULL; \
24903+ if (detect_##funcname == 0) \
24904+ { \
24905+ detect_##funcname = 1; \
24906+ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
24907+ }
24908+
24909+int display_function_call = 0;
24910+
24911+static const int defaultAttribList[] = {
24912+ GLX_RGBA,
24913+ GLX_RED_SIZE, 1,
24914+ GLX_GREEN_SIZE, 1,
24915+ GLX_BLUE_SIZE, 1,
24916+ GLX_DOUBLEBUFFER,
24917+ None
24918+};
24919+
24920+static XVisualInfo *get_default_visual(Display *dpy)
24921+{
24922+ static XVisualInfo *vis = NULL;
24923+ XVisualInfo theTemplate;
24924+ int numVisuals;
24925+
24926+ if (vis)
24927+ return vis;
24928+ fprintf(stderr, "get_default_visual\n");
24929+ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
24930+ * (int*)defaultAttribList); */
24931+ theTemplate.screen = 0;
24932+ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
24933+
24934+ return vis;
24935+}
24936+
24937+
24938+static Display *parent_dpy = NULL;
24939+static Window qemu_parent_window = 0;
24940+
24941+static Window active_win = 0; /* FIXME */
24942+static int active_win_x = 0;
24943+static int active_win_y = 0;
24944+
24945+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
24946+{
24947+ parent_dpy = _dpy;
24948+ qemu_parent_window = _parent_window;
24949+ if (active_win)
24950+ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
24951+ active_win_y);
24952+}
24953+
24954+static int local_connection = 0;
24955+void opengl_exec_set_local_connection()
24956+{
24957+ local_connection = 1;
24958+}
24959+
24960+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
24961+ XVisualInfo *vis, const char *name,
24962+ int x, int y, int width, int height)
24963+{
24964+ int scrnum;
24965+ XSetWindowAttributes attr = { 0 };
24966+ unsigned long mask;
24967+ Window root;
24968+ Window win;
24969+
24970+ scrnum = DefaultScreen(dpy);
24971+ root = RootWindow(dpy, scrnum);
24972+
24973+ /* window attributes */
24974+ attr.background_pixel = 0xff000000;
24975+ attr.border_pixel = 0;
24976+ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
24977+ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
24978+ attr.save_under = True;
24979+ // if (local_parent_window == NULL && qemu_parent_window == NULL)
24980+ attr.override_redirect = True;
24981+ // else
24982+ // attr.override_redirect = True;
24983+ attr.cursor = None;
24984+ mask =
24985+ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
24986+ CWOverrideRedirect | CWSaveUnder;
24987+
24988+ if (local_parent_window)
24989+ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
24990+ vis->depth, InputOutput, vis->visual, mask, &attr);
24991+ else if (qemu_parent_window)
24992+ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
24993+ vis->depth, InputOutput, vis->visual, mask, &attr);
24994+ else
24995+ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
24996+ InputOutput, vis->visual, mask, &attr);
24997+
24998+ /* set hints and properties */
24999+ {
25000+ XSizeHints sizehints;
25001+
25002+ sizehints.x = x;
25003+ sizehints.y = y;
25004+ sizehints.width = width;
25005+ sizehints.height = height;
25006+ sizehints.flags = USSize | USPosition;
25007+ XSetWMNormalHints(dpy, win, &sizehints);
25008+ XSetStandardProperties(dpy, win, name, name, None,
25009+ (char **) NULL, 0, &sizehints);
25010+ }
25011+
25012+ XSync(dpy, 0);
25013+
25014+ /*
25015+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
25016+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
25017+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
25018+ * } } */
25019+
25020+ /* TODO */
25021+ if (!active_win)
25022+ active_win = win;
25023+
25024+ return win;
25025+}
25026+
25027+typedef struct {
25028+ void *key;
25029+ void *value;
25030+} Assoc;
25031+
25032+#define MAX_HANDLED_PROCESS 100
25033+#define MAX_ASSOC_SIZE 100
25034+
25035+#define MAX_FBCONFIG 10
25036+
25037+#include "opengl_utils.h"
25038+
25039+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
25040+
25041+
25042+typedef struct {
25043+ int x;
25044+ int y;
25045+ int width;
25046+ int height;
25047+ int map_state;
25048+} WindowPosStruct;
25049+
25050+typedef struct {
25051+ GLbitfield mask;
25052+ int activeTextureIndex;
25053+} ClientState;
25054+
25055+#define MAX_CLIENT_STATE_STACK_SIZE 16
25056+
25057+typedef struct {
25058+ int ref;
25059+ int fake_ctxt;
25060+ int fake_shareList;
25061+ GLXContext context;
25062+ GLXDrawable drawable;
25063+
25064+ void *vertexPointer;
25065+ void *normalPointer;
25066+ void *colorPointer;
25067+ void *secondaryColorPointer;
25068+ void *indexPointer;
25069+ void *texCoordPointer[NB_MAX_TEXTURES];
25070+ void *edgeFlagPointer;
25071+ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
25072+ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
25073+ void *weightPointer;
25074+ void *matrixIndexPointer;
25075+ void *fogCoordPointer;
25076+ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
25077+ void *interleavedArrays;
25078+ void *elementPointerATI;
25079+
25080+ int vertexPointerSize;
25081+ int normalPointerSize;
25082+ int colorPointerSize;
25083+ int secondaryColorPointerSize;
25084+ int indexPointerSize;
25085+ int texCoordPointerSize[NB_MAX_TEXTURES];
25086+ int edgeFlagPointerSize;
25087+ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
25088+ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
25089+ int weightPointerSize;
25090+ int matrixIndexPointerSize;
25091+ int fogCoordPointerSize;
25092+ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
25093+ int interleavedArraysSize;
25094+ int elementPointerATISize;
25095+
25096+ int selectBufferSize;
25097+ void *selectBufferPtr;
25098+ int feedbackBufferSize;
25099+ void *feedbackBufferPtr;
25100+
25101+ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
25102+ int clientStateSp;
25103+ int activeTextureIndex;
25104+
25105+ unsigned int ownTabTextures[32768];
25106+ unsigned int *tabTextures;
25107+ RangeAllocator ownTextureAllocator;
25108+ RangeAllocator *textureAllocator;
25109+
25110+ unsigned int ownTabBuffers[32768];
25111+ unsigned int *tabBuffers;
25112+ RangeAllocator ownBufferAllocator;
25113+ RangeAllocator *bufferAllocator;
25114+
25115+ unsigned int ownTabLists[32768];
25116+ unsigned int *tabLists;
25117+ RangeAllocator ownListAllocator;
25118+ RangeAllocator *listAllocator;
25119+
25120+#ifdef SYSTEMATIC_ERROR_CHECK
25121+ int last_error;
25122+#endif
25123+} GLState;
25124+
25125+typedef struct {
25126+ int process_id;
25127+ int instr_counter;
25128+
25129+ int x, y, width, height;
25130+ WindowPosStruct currentDrawablePos;
25131+
25132+ int next_available_context_number;
25133+ int next_available_pbuffer_number;
25134+
25135+ int nb_states;
25136+ GLState default_state;
25137+ GLState **glstates;
25138+ GLState *current_state;
25139+
25140+ int nfbconfig;
25141+ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
25142+ int fbconfigs_max[MAX_FBCONFIG];
25143+ int nfbconfig_total;
25144+
25145+ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
25146+ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
25147+ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
25148+ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
25149+
25150+ Display *dpy;
25151+
25152+ int began;
25153+ int primitive;
25154+ int bufsize;
25155+ int bufstart;
25156+ arg_t *cmdbuf;
25157+} ProcessStruct;
25158+
25159+static ProcessStruct processes[MAX_HANDLED_PROCESS];
25160+
25161+void init_process_tab()
25162+{
25163+ memset(processes, 0, sizeof(processes));
25164+}
25165+
25166+#define ARG_TO_CHAR(x) (char)(x)
25167+#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
25168+#define ARG_TO_SHORT(x) (short)(x)
25169+#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
25170+#define ARG_TO_INT(x) (int)(x)
25171+#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
25172+#define ARG_TO_FLOAT(x) (*(float*)&(x))
25173+#define ARG_TO_DOUBLE(x) (*(double*)(x))
25174+
25175+#include "server_stub.c"
25176+
25177+/* ---- */
25178+
25179+#ifdef BUFFER_BEGINEND
25180+/* A user of the following two functions must not buffer any calls that
25181+ * may throw an error (i.e. errors conditions must be checked before
25182+ * storing in the buffer) or return values. */
25183+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
25184+{
25185+ arg_t *ret;
25186+
25187+ if (unlikely(process->bufstart + elems > process->bufsize)) {
25188+ process->bufsize = (process->bufsize ?: 0x100) << 1;
25189+ process->cmdbuf = qemu_realloc(process->cmdbuf,
25190+ process->bufsize * sizeof(arg_t));
25191+ }
25192+
25193+ ret = process->cmdbuf + process->bufstart;
25194+ process->bufstart += elems;
25195+ return ret;
25196+}
25197+
25198+static inline void cmd_buffer_replay(ProcessStruct *process)
25199+{
25200+ Signature *sig;
25201+ int func_number;
25202+ int ret_int;
25203+ char ret_char;
25204+ arg_t *call = process->cmdbuf;
25205+
25206+ while (process->bufstart) {
25207+ func_number = *call ++;
25208+ sig = (Signature *) tab_opengl_calls[func_number];
25209+
25210+ execute_func(func_number, call, &ret_int, &ret_char);
25211+
25212+ call += sig->nb_args;
25213+ process->bufstart -= sig->nb_args + 1;
25214+ }
25215+}
25216+#endif
25217+
25218+/* ---- */
25219+
25220+typedef void *ClientGLXDrawable;
25221+static inline ClientGLXDrawable to_drawable(arg_t arg)
25222+{
25223+#ifdef TARGET_X86_64
25224+ if (arg > (unsigned long) -1) {
25225+ fprintf(stderr, "GLXDrawable too big for this implementation\n");
25226+ exit(-1);
25227+ }
25228+#endif
25229+ return (void *) (unsigned long) arg;
25230+}
25231+
25232+GLXContext get_association_fakecontext_glxcontext(
25233+ ProcessStruct *process, int fakecontext)
25234+{
25235+ int i;
25236+
25237+ for (i = 0;
25238+ i < MAX_ASSOC_SIZE &&
25239+ process->association_fakecontext_glxcontext[i].key; i++)
25240+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25241+ fakecontext)
25242+ return (GLXContext)
25243+ process->association_fakecontext_glxcontext[i].value;
25244+
25245+ return NULL;
25246+}
25247+
25248+void set_association_fakecontext_glxcontext(
25249+ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
25250+{
25251+ int i;
25252+
25253+ for (i = 0;
25254+ i < MAX_ASSOC_SIZE &&
25255+ process->association_fakecontext_glxcontext[i].key; i++)
25256+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25257+ fakecontext)
25258+ break;
25259+
25260+ if (i < MAX_ASSOC_SIZE) {
25261+ process->association_fakecontext_glxcontext[i].key =
25262+ (void *) (long) fakecontext;
25263+ process->association_fakecontext_glxcontext[i].value =
25264+ (void *) glxcontext;
25265+ } else
25266+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25267+}
25268+
25269+void unset_association_fakecontext_glxcontext(
25270+ ProcessStruct *process, int fakecontext)
25271+{
25272+ int i;
25273+
25274+ for (i = 0;
25275+ i < MAX_ASSOC_SIZE &&
25276+ process->association_fakecontext_glxcontext[i].key; i++)
25277+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25278+ fakecontext) {
25279+ memmove(&process->association_fakecontext_glxcontext[i],
25280+ &process->association_fakecontext_glxcontext[i + 1],
25281+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25282+ return;
25283+ }
25284+}
25285+
25286+/* ---- */
25287+
25288+XVisualInfo *get_association_fakecontext_visual(
25289+ ProcessStruct *process, int fakecontext)
25290+{
25291+ int i;
25292+
25293+ for (i = 0;
25294+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25295+ i++)
25296+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25297+ fakecontext)
25298+ return process->association_fakecontext_visual[i].value;
25299+
25300+ return NULL;
25301+}
25302+
25303+void set_association_fakecontext_visual(ProcessStruct *process,
25304+ int fakecontext, XVisualInfo *visual)
25305+{
25306+ int i;
25307+
25308+ for (i = 0;
25309+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25310+ i++)
25311+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25312+ fakecontext)
25313+ break;
25314+
25315+ if (i < MAX_ASSOC_SIZE) {
25316+ process->association_fakecontext_visual[i].key =
25317+ (void *) (long) fakecontext;
25318+ process->association_fakecontext_visual[i].value = (void *) visual;
25319+ } else
25320+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25321+}
25322+
25323+/* ---- */
25324+
25325+GLXPbuffer get_association_fakepbuffer_pbuffer(
25326+ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
25327+{
25328+ int i;
25329+
25330+ for (i = 0; i < MAX_ASSOC_SIZE &&
25331+ process->association_fakepbuffer_pbuffer[i].key; i ++)
25332+ if ((ClientGLXDrawable)
25333+ process->association_fakepbuffer_pbuffer[i].key ==
25334+ fakepbuffer)
25335+ return (GLXPbuffer)
25336+ process->association_fakepbuffer_pbuffer[i].value;
25337+
25338+ return 0;
25339+}
25340+
25341+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
25342+ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
25343+{
25344+ int i;
25345+
25346+ for (i = 0;
25347+ i < MAX_ASSOC_SIZE &&
25348+ process->association_fakepbuffer_pbuffer[i].key; i++)
25349+ if ((ClientGLXDrawable)
25350+ process->association_fakepbuffer_pbuffer[i].key ==
25351+ fakepbuffer)
25352+ break;
25353+
25354+ if (i < MAX_ASSOC_SIZE) {
25355+ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
25356+ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
25357+ } else
25358+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25359+}
25360+
25361+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
25362+ ClientGLXDrawable fakepbuffer)
25363+{
25364+ int i;
25365+
25366+ for (i = 0; i < MAX_ASSOC_SIZE &&
25367+ process->association_fakepbuffer_pbuffer[i].key; i++)
25368+ if ((ClientGLXDrawable)
25369+ process->association_fakepbuffer_pbuffer[i].key ==
25370+ fakepbuffer) {
25371+ memmove(&process->association_fakepbuffer_pbuffer[i],
25372+ &process->association_fakepbuffer_pbuffer[i + 1],
25373+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25374+ return;
25375+ }
25376+}
25377+
25378+/* ---- */
25379+
25380+GLXDrawable get_association_clientdrawable_serverdrawable(
25381+ ProcessStruct *process, ClientGLXDrawable clientdrawable)
25382+{
25383+ int i;
25384+
25385+ for (i = 0; i < MAX_ASSOC_SIZE &&
25386+ process->association_clientdrawable_serverdrawable[i].key;
25387+ i++)
25388+ if ((ClientGLXDrawable) process->
25389+ association_clientdrawable_serverdrawable[i].key ==
25390+ clientdrawable)
25391+ return (GLXDrawable) process->
25392+ association_clientdrawable_serverdrawable[i].value;
25393+
25394+ return (GLXDrawable) 0;
25395+}
25396+
25397+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
25398+ ProcessStruct *process, GLXDrawable serverdrawable)
25399+{
25400+ int i;
25401+
25402+ for (i = 0; i < MAX_ASSOC_SIZE &&
25403+ process->association_clientdrawable_serverdrawable[i].key;
25404+ i ++)
25405+ if ((GLXDrawable) process->
25406+ association_clientdrawable_serverdrawable[i].value ==
25407+ serverdrawable)
25408+ return (ClientGLXDrawable)
25409+ process->association_clientdrawable_serverdrawable[i].key;
25410+
25411+ return NULL;
25412+}
25413+
25414+void set_association_clientdrawable_serverdrawable(
25415+ ProcessStruct *process, ClientGLXDrawable clientdrawable,
25416+ GLXDrawable serverdrawable)
25417+{
25418+ int i;
25419+
25420+ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
25421+ i ++)
25422+ if ((ClientGLXDrawable) process->
25423+ association_clientdrawable_serverdrawable[i].key ==
25424+ clientdrawable)
25425+ break;
25426+
25427+ if (i < MAX_ASSOC_SIZE) {
25428+ process->association_clientdrawable_serverdrawable[i].key =
25429+ (void *) clientdrawable;
25430+ process->association_clientdrawable_serverdrawable[i].value =
25431+ (void *) serverdrawable;
25432+ } else
25433+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25434+}
25435+
25436+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
25437+{
25438+ XWindowAttributes window_attributes_return;
25439+ Window child;
25440+ int x, y;
25441+ Window root = DefaultRootWindow(dpy);
25442+
25443+ XGetWindowAttributes(dpy, win, &window_attributes_return);
25444+ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
25445+ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
25446+ * window_attributes_return.height); */
25447+ pos->x = x;
25448+ pos->y = y;
25449+ pos->width = window_attributes_return.width;
25450+ pos->height = window_attributes_return.height;
25451+ pos->map_state = window_attributes_return.map_state;
25452+}
25453+
25454+static int is_gl_vendor_ati(Display *dpy)
25455+{
25456+ static int is_gl_vendor_ati_flag = 0;
25457+ static int has_init = 0;
25458+
25459+ if (has_init == 0) {
25460+ has_init = 1;
25461+ is_gl_vendor_ati_flag =
25462+ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
25463+ }
25464+ return is_gl_vendor_ati_flag;
25465+}
25466+
25467+static int get_server_texture(ProcessStruct *process,
25468+ unsigned int client_texture)
25469+{
25470+ unsigned int server_texture = 0;
25471+
25472+ if (client_texture < 32768) {
25473+ server_texture = process->current_state->tabTextures[client_texture];
25474+ } else {
25475+ fprintf(stderr, "invalid texture name %d\n", client_texture);
25476+ }
25477+ return server_texture;
25478+}
25479+
25480+static int get_server_buffer(ProcessStruct *process,
25481+ unsigned int client_buffer)
25482+{
25483+ unsigned int server_buffer = 0;
25484+
25485+ if (client_buffer < 32768) {
25486+ server_buffer = process->current_state->tabBuffers[client_buffer];
25487+ } else {
25488+ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
25489+ }
25490+ return server_buffer;
25491+}
25492+
25493+
25494+static int get_server_list(ProcessStruct *process, unsigned int client_list)
25495+{
25496+ unsigned int server_list = 0;
25497+
25498+ if (client_list < 32768) {
25499+ server_list = process->current_state->tabLists[client_list];
25500+ } else {
25501+ fprintf(stderr, "invalid list name %d\n", client_list);
25502+ }
25503+ return server_list;
25504+}
25505+
25506+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
25507+{
25508+ int i;
25509+ int nbtotal = 0;
25510+
25511+ for (i = 0; i < process->nfbconfig; i++) {
25512+ assert(client_fbconfig >= 1 + nbtotal);
25513+ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
25514+ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
25515+ }
25516+ nbtotal += process->fbconfigs_max[i];
25517+ }
25518+ return 0;
25519+}
25520+
25521+typedef struct {
25522+ int attribListLength;
25523+ int *attribList;
25524+ XVisualInfo *visInfo;
25525+} AssocAttribListVisual;
25526+
25527+static int nTabAssocAttribListVisual = 0;
25528+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
25529+
25530+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
25531+ int
25532+ booleanMustHaveValue)
25533+{
25534+ int i = 0;
25535+
25536+ while (attribList[i]) {
25537+ if (booleanMustHaveValue ||
25538+ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25539+ attribList[i] == GLX_DOUBLEBUFFER ||
25540+ attribList[i] == GLX_STEREO)) {
25541+ i += 2;
25542+ } else {
25543+ i++;
25544+ }
25545+ }
25546+ return i + 1;
25547+}
25548+
25549+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
25550+{
25551+ if (_attribList == NULL)
25552+ return 0;
25553+ int attribListLength =
25554+ _compute_length_of_attrib_list_including_zero(_attribList, 0);
25555+ int i;
25556+
25557+ int *attribList = malloc(sizeof(int) * attribListLength);
25558+ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
25559+
25560+ i = 0;
25561+ while (attribList[i]) {
25562+ if (!
25563+ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25564+ attribList[i] == GLX_DOUBLEBUFFER ||
25565+ attribList[i] == GLX_STEREO)) {
25566+ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
25567+ && getenv("DISABLE_SAMPLE_BUFFERS")) {
25568+ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
25569+ attribList[i + 1] = 0;
25570+ }
25571+ i += 2;
25572+ } else {
25573+ i++;
25574+ }
25575+ }
25576+
25577+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25578+ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
25579+ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
25580+ attribListLength * sizeof(int)) == 0) {
25581+ free(attribList);
25582+ return (tabAssocAttribListVisual[i].
25583+ visInfo) ? tabAssocAttribListVisual[i].visInfo->
25584+ visualid : 0;
25585+ }
25586+ }
25587+ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
25588+
25589+ tabAssocAttribListVisual = realloc(
25590+ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
25591+ (nTabAssocAttribListVisual + 1));
25592+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
25593+ attribListLength;
25594+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
25595+ (int *) malloc(sizeof(int) * attribListLength);
25596+ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
25597+ attribList, sizeof(int) * attribListLength);
25598+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25599+ nTabAssocAttribListVisual++;
25600+ free(attribList);
25601+ return (visInfo) ? visInfo->visualid : 0;
25602+}
25603+
25604+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
25605+ int visualid)
25606+{
25607+ int i, n;
25608+ XVisualInfo template;
25609+ XVisualInfo *visInfo;
25610+
25611+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25612+ if (tabAssocAttribListVisual[i].visInfo &&
25613+ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
25614+ return tabAssocAttribListVisual[i].visInfo;
25615+ }
25616+ }
25617+ template.visualid = visualid;
25618+ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
25619+ tabAssocAttribListVisual =
25620+ realloc(tabAssocAttribListVisual,
25621+ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
25622+ 1));
25623+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
25624+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
25625+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25626+ nTabAssocAttribListVisual++;
25627+ return visInfo;
25628+}
25629+
25630+typedef struct {
25631+ int x;
25632+ int y;
25633+ int width;
25634+ int height;
25635+ int xhot;
25636+ int yhot;
25637+ int *pixels;
25638+} ClientCursor;
25639+
25640+#if 0
25641+static ClientCursor client_cursor = { 0 };
25642+#endif
25643+
25644+static void do_glClientActiveTextureARB(int texture)
25645+{
25646+ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
25647+
25648+ if (ptr_func_glClientActiveTextureARB) {
25649+ ptr_func_glClientActiveTextureARB(texture);
25650+ }
25651+}
25652+
25653+#ifdef CURSOR_TRICK
25654+static void do_glActiveTextureARB(int texture)
25655+{
25656+ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
25657+
25658+ if (ptr_func_glActiveTextureARB) {
25659+ ptr_func_glActiveTextureARB(texture);
25660+ }
25661+}
25662+
25663+static void do_glUseProgramObjectARB(GLhandleARB programObj)
25664+{
25665+ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
25666+
25667+ if (ptr_func_glUseProgramObjectARB) {
25668+ ptr_func_glUseProgramObjectARB(programObj);
25669+ }
25670+}
25671+#endif
25672+
25673+static void destroy_gl_state(GLState *state)
25674+{
25675+ int i;
25676+
25677+ if (state->vertexPointer)
25678+ free(state->vertexPointer);
25679+ if (state->normalPointer)
25680+ free(state->normalPointer);
25681+ if (state->indexPointer)
25682+ free(state->indexPointer);
25683+ if (state->colorPointer)
25684+ free(state->colorPointer);
25685+ if (state->secondaryColorPointer)
25686+ free(state->secondaryColorPointer);
25687+ for (i = 0; i < NB_MAX_TEXTURES; i++) {
25688+ if (state->texCoordPointer[i])
25689+ free(state->texCoordPointer[i]);
25690+ }
25691+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
25692+ if (state->vertexAttribPointer[i])
25693+ free(state->vertexAttribPointer[i]);
25694+ }
25695+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
25696+ if (state->vertexAttribPointerNV[i])
25697+ free(state->vertexAttribPointerNV[i]);
25698+ }
25699+ if (state->weightPointer)
25700+ free(state->weightPointer);
25701+ if (state->matrixIndexPointer)
25702+ free(state->matrixIndexPointer);
25703+ if (state->fogCoordPointer)
25704+ free(state->fogCoordPointer);
25705+ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
25706+ if (state->variantPointerEXT[i])
25707+ free(state->variantPointerEXT[i]);
25708+ }
25709+ if (state->interleavedArrays)
25710+ free(state->interleavedArrays);
25711+ if (state->elementPointerATI)
25712+ free(state->elementPointerATI);
25713+}
25714+
25715+static void init_gl_state(GLState *state)
25716+{
25717+ state->textureAllocator = &state->ownTextureAllocator;
25718+ state->tabTextures = state->ownTabTextures;
25719+ state->bufferAllocator = &state->ownBufferAllocator;
25720+ state->tabBuffers = state->ownTabBuffers;
25721+ state->listAllocator = &state->ownListAllocator;
25722+ state->tabLists = state->ownTabLists;
25723+}
25724+
25725+/*
25726+ * Translate the nth element of list from type to GLuint.
25727+ */
25728+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
25729+{
25730+ GLbyte *bptr;
25731+ GLubyte *ubptr;
25732+ GLshort *sptr;
25733+ GLushort *usptr;
25734+ GLint *iptr;
25735+ GLuint *uiptr;
25736+ GLfloat *fptr;
25737+
25738+ switch (type) {
25739+ case GL_BYTE:
25740+ bptr = (GLbyte *) list;
25741+ return (GLuint) *(bptr + n);
25742+ case GL_UNSIGNED_BYTE:
25743+ ubptr = (GLubyte *) list;
25744+ return (GLuint) *(ubptr + n);
25745+ case GL_SHORT:
25746+ sptr = (GLshort *) list;
25747+ return (GLuint) *(sptr + n);
25748+ case GL_UNSIGNED_SHORT:
25749+ usptr = (GLushort *) list;
25750+ return (GLuint) *(usptr + n);
25751+ case GL_INT:
25752+ iptr = (GLint *) list;
25753+ return (GLuint) *(iptr + n);
25754+ case GL_UNSIGNED_INT:
25755+ uiptr = (GLuint *) list;
25756+ return (GLuint) *(uiptr + n);
25757+ case GL_FLOAT:
25758+ fptr = (GLfloat *) list;
25759+ return (GLuint) *(fptr + n);
25760+ case GL_2_BYTES:
25761+ ubptr = ((GLubyte *) list) + 2 * n;
25762+ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
25763+ case GL_3_BYTES:
25764+ ubptr = ((GLubyte *) list) + 3 * n;
25765+ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
25766+ (GLuint) *(ubptr + 2);
25767+ case GL_4_BYTES:
25768+ ubptr = ((GLubyte *) list) + 4 * n;
25769+ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
25770+ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
25771+ default:
25772+ return 0;
25773+ }
25774+}
25775+
25776+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
25777+ GLXContext shareList, int fake_shareList)
25778+{
25779+ process->glstates =
25780+ realloc(process->glstates,
25781+ (process->nb_states + 1) * sizeof(GLState *));
25782+ process->glstates[process->nb_states] = malloc(sizeof(GLState));
25783+ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
25784+ process->glstates[process->nb_states]->ref = 1;
25785+ process->glstates[process->nb_states]->context = ctxt;
25786+ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
25787+ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
25788+ init_gl_state(process->glstates[process->nb_states]);
25789+ if (shareList && fake_shareList) {
25790+ int i;
25791+
25792+ for (i = 0; i < process->nb_states; i++) {
25793+ if (process->glstates[i]->fake_ctxt == fake_shareList) {
25794+ process->glstates[i]->ref++;
25795+ process->glstates[process->nb_states]->textureAllocator =
25796+ process->glstates[i]->textureAllocator;
25797+ process->glstates[process->nb_states]->tabTextures =
25798+ process->glstates[i]->tabTextures;
25799+ process->glstates[process->nb_states]->bufferAllocator =
25800+ process->glstates[i]->bufferAllocator;
25801+ process->glstates[process->nb_states]->tabBuffers =
25802+ process->glstates[i]->tabBuffers;
25803+ process->glstates[process->nb_states]->listAllocator =
25804+ process->glstates[i]->listAllocator;
25805+ process->glstates[process->nb_states]->tabLists =
25806+ process->glstates[i]->tabLists;
25807+ break;
25808+ }
25809+ }
25810+ }
25811+ process->nb_states++;
25812+}
25813+
25814+static ProcessStruct *process;
25815+
25816+void do_disconnect_current(void)
25817+{
25818+ int i;
25819+ Display *dpy = process->dpy;
25820+
25821+ glXMakeCurrent(dpy, 0, NULL);
25822+
25823+ for (i = 0; i < MAX_ASSOC_SIZE &&
25824+ process->association_fakecontext_glxcontext[i].key; i ++) {
25825+ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
25826+
25827+ fprintf(stderr, "Destroy context corresponding to fake_context"
25828+ " = %ld\n", (long) process->
25829+ association_fakecontext_glxcontext[i].key);
25830+ glXDestroyContext(dpy, ctxt);
25831+ }
25832+
25833+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
25834+
25835+ for (i = 0; i < MAX_ASSOC_SIZE &&
25836+ process->association_fakepbuffer_pbuffer[i].key; i ++) {
25837+ GLXPbuffer pbuffer = (GLXPbuffer)
25838+ process->association_fakepbuffer_pbuffer[i].value;
25839+
25840+ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
25841+ " = %ld\n", (long) process->
25842+ association_fakepbuffer_pbuffer[i].key);
25843+ if (!is_gl_vendor_ati(dpy))
25844+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
25845+ }
25846+
25847+ for (i = 0; i < MAX_ASSOC_SIZE && process->
25848+ association_clientdrawable_serverdrawable[i].key; i ++) {
25849+ Window win = (Window) process->
25850+ association_clientdrawable_serverdrawable[i].value;
25851+
25852+ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
25853+ "= %p\n", (int) win, process->
25854+ association_clientdrawable_serverdrawable[i].key);
25855+
25856+ XDestroyWindow(dpy, win);
25857+ if (active_win == win)
25858+ active_win = 0;
25859+
25860+ int loop = 1; // 1;
25861+ while (loop) {
25862+ while (XPending(dpy) > 0) {
25863+ XEvent event;
25864+
25865+ XNextEvent(dpy, &event);
25866+ switch (event.type) {
25867+ case DestroyNotify:
25868+ {
25869+ if (((XDestroyWindowEvent *) &event)->window == win)
25870+ loop = 0;
25871+ break;
25872+ }
25873+ }
25874+ }
25875+ break; /* TODO */
25876+ }
25877+ }
25878+
25879+ for (i = 0; i < process->nb_states; i++) {
25880+ destroy_gl_state(process->glstates[i]);
25881+ free(process->glstates[i]);
25882+ }
25883+ destroy_gl_state(&process->default_state);
25884+ free(process->glstates);
25885+
25886+ if (process->cmdbuf)
25887+ qemu_free(process->cmdbuf);
25888+
25889+ for (i = 0; &processes[i] != process; i ++);
25890+ memmove(&processes[i], &processes[i + 1],
25891+ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
25892+}
25893+
25894+static const int beginend_allowed[GL_N_CALLS] = {
25895+#undef MAGIC_MACRO
25896+#define MAGIC_MACRO(name) [name ## _func] = 1,
25897+#include "gl_beginend.h"
25898+};
25899+
25900+void do_context_switch(Display *dpy, pid_t pid, int call)
25901+{
25902+ int i;
25903+
25904+ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
25905+ if (processes[i].process_id == pid) {
25906+ process = &processes[i];
25907+ break;
25908+ } else if (processes[i].process_id == 0) {
25909+ process = &processes[i];
25910+ memset(process, 0, sizeof(ProcessStruct));
25911+ process->process_id = pid;
25912+ init_gl_state(&process->default_state);
25913+ process->current_state = &process->default_state;
25914+ process->dpy = dpy;
25915+ break;
25916+ }
25917+ if (process == NULL) {
25918+ fprintf(stderr, "Too many processes !\n");
25919+ exit(-1);
25920+ }
25921+
25922+ switch (call) {
25923+ case _init32_func:
25924+ case _init64_func:
25925+ case _exit_process_func:
25926+ case glXMakeCurrent_func:
25927+ /* Do nothing */
25928+ break;
25929+
25930+ default:
25931+#if 0
25932+ glFlush();
25933+ glFinish();
25934+ glXSwapBuffers(dpy, drawable);
25935+ if (process->current_state == &process->default_state)
25936+ /* Where do commands like glViewport go when no drawable or
25937+ * context are current - i.e. after a call to
25938+ * glXMakeCurrent(dpy, 0, 0) ? */;
25939+ else
25940+#endif
25941+ glXMakeCurrent(dpy, process->current_state->drawable,
25942+ process->current_state->context);
25943+ }
25944+}
25945+
25946+int do_function_call(int func_number, arg_t *args, char *ret_string)
25947+{
25948+ char ret_char = 0;
25949+ int ret_int = 0;
25950+ const char *ret_str = NULL;
25951+ Display *dpy = process->dpy;
25952+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
25953+ int ret_type = signature->ret_type;
25954+
25955+ if (parent_dpy)
25956+ dpy = parent_dpy;
25957+
25958+ process->instr_counter++;
25959+ if (display_function_call)
25960+ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
25961+ tab_opengl_calls_name[func_number]);
25962+
25963+#ifdef BUFFER_BEGINEND
25964+ if (process->began) {
25965+ /* Need to check for any errors now because later we won't have
25966+ * a chance to report them. */
25967+ if (beginend_allowed[func_number]) {
25968+ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
25969+
25970+ /* TODO: pointer arguments */
25971+ buf[0] = func_number;
25972+ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
25973+ } else if (likely(func_number == glEnd_func)) {
25974+ process->began = 0;
25975+
25976+ glBegin(process->primitive);
25977+ cmd_buffer_replay(process);
25978+ glEnd();
25979+ } else {
25980+ /* TODO: properly report */
25981+#ifdef SYSTEMATIC_ERROR_CHECK
25982+ process->current_state->last_error = INVALID_OPERATION;
25983+#endif
25984+ }
25985+
25986+ func_number = -1;
25987+ }
25988+#endif
25989+
25990+ switch (func_number) {
25991+ case -1:
25992+ break;
25993+
25994+ case _init_func:
25995+ *(int *) args[1] = 1;
25996+ break;
25997+
25998+ case _synchronize_func:
25999+ ret_int = 1;
26000+ break;
26001+
26002+ case _exit_process_func:
26003+ do_disconnect_current();
26004+ break;
26005+
26006+ case _changeWindowState_func:
26007+ {
26008+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
26009+
26010+ if (display_function_call)
26011+ fprintf(stderr, "client_drawable=%p\n",
26012+ (void *) client_drawable);
26013+
26014+ GLXDrawable drawable =
26015+ get_association_clientdrawable_serverdrawable(
26016+ process, client_drawable);
26017+ if (drawable) {
26018+ if (args[1] == IsViewable) {
26019+ WindowPosStruct pos;
26020+
26021+ _get_window_pos(dpy, drawable, &pos);
26022+ if (pos.map_state != args[1]) {
26023+ XMapWindow(dpy, drawable);
26024+
26025+ int loop = 1; // 1;
26026+
26027+ while (loop) {
26028+ while (XPending(dpy) > 0) {
26029+ XEvent event;
26030+
26031+ XNextEvent(dpy, &event);
26032+ switch (event.type) {
26033+ case ConfigureNotify:
26034+ {
26035+ if (((XConfigureEvent *) &event)->
26036+ window == drawable) {
26037+ loop = 0;
26038+ }
26039+ break;
26040+ }
26041+ }
26042+ }
26043+ break; /* TODO */
26044+ }
26045+ }
26046+ }
26047+ }
26048+
26049+ break;
26050+ }
26051+
26052+ case _moveResizeWindow_func:
26053+ {
26054+ int *params = (int *) args[1];
26055+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
26056+
26057+ if (display_function_call)
26058+ fprintf(stderr, "client_drawable=%p\n",
26059+ (void *) client_drawable);
26060+
26061+ GLXDrawable drawable =
26062+ get_association_clientdrawable_serverdrawable(
26063+ process, client_drawable);
26064+ if (drawable) {
26065+ WindowPosStruct pos;
26066+
26067+ _get_window_pos(dpy, drawable, &pos);
26068+ if (!
26069+ (params[0] == pos.x && params[1] == pos.y &&
26070+ params[2] == pos.width && params[3] == pos.height)) {
26071+ int redim = !(params[2] == pos.width &&
26072+ params[3] == pos.height);
26073+ active_win_x = params[0];
26074+ active_win_y = params[1];
26075+
26076+ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
26077+ pos.x, pos.y, pos.width, pos.height);
26078+ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
26079+ params[0], params[1], params[2], params[3]);
26080+ XMoveResizeWindow(dpy, drawable, params[0], params[1],
26081+ params[2], params[3]);
26082+ int loop = 0; // = 1
26083+
26084+ while (loop) {
26085+ while (XPending(dpy) > 0) {
26086+ XEvent event;
26087+
26088+ XNextEvent(dpy, &event);
26089+ switch (event.type) {
26090+ case ConfigureNotify:
26091+ {
26092+ if (((XConfigureEvent *) &event)->
26093+ window == drawable) {
26094+ loop = 0;
26095+ }
26096+ break;
26097+ }
26098+ }
26099+ }
26100+ }
26101+ /* The window should have resized by now, but force the
26102+ * new size anyway. */
26103+ _get_window_pos(dpy, drawable, &pos);
26104+ pos.width = params[2];
26105+ pos.height = params[3];
26106+ process->currentDrawablePos = pos;
26107+ // if (getenv("FORCE_GL_VIEWPORT"))
26108+ if (redim)
26109+ glViewport(0, 0, pos.width, pos.height);
26110+ }
26111+ }
26112+ break;
26113+ }
26114+
26115+ case _send_cursor_func:
26116+ {
26117+#if 0
26118+ int x = args[0];
26119+ int y = args[1];
26120+ int width = args[2];
26121+ int height = args[3];
26122+ int xhot = args[4];
26123+ int yhot = args[5];
26124+ int *pixels = (int *) args[6];
26125+
26126+ client_cursor.x = x;
26127+ client_cursor.y = y;
26128+ client_cursor.width = width;
26129+ client_cursor.height = height;
26130+ client_cursor.xhot = xhot;
26131+ client_cursor.yhot = yhot;
26132+ if (pixels) {
26133+ client_cursor.pixels =
26134+ realloc(client_cursor.pixels,
26135+ client_cursor.width * client_cursor.height *
26136+ sizeof(int));
26137+ memcpy(client_cursor.pixels, pixels,
26138+ client_cursor.width * client_cursor.height *
26139+ sizeof(int));
26140+ }
26141+ int in_window = (x >= 0 && y >= 0 &&
26142+ x < process->currentDrawablePos.width &&
26143+ y < process->currentDrawablePos.height);
26144+ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
26145+ // "in window" : "not in window");
26146+#endif
26147+ break;
26148+ }
26149+
26150+#ifdef BUFFER_BEGINEND
26151+ case glBegin_func:
26152+ process->began = 1;
26153+ process->primitive = args[0];
26154+ break;
26155+#endif
26156+
26157+ case glXWaitGL_func:
26158+ {
26159+ glXWaitGL();
26160+ ret_int = 0;
26161+ break;
26162+ }
26163+
26164+ case glXWaitX_func:
26165+ {
26166+ glXWaitX();
26167+ ret_int = 0;
26168+ break;
26169+ }
26170+
26171+ case glXChooseVisual_func:
26172+ {
26173+ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
26174+ break;
26175+ }
26176+
26177+ case glXQueryExtensionsString_func:
26178+ {
26179+ ret_str = glXQueryExtensionsString(dpy, 0);
26180+ break;
26181+ }
26182+
26183+ case glXQueryServerString_func:
26184+ {
26185+ ret_str = glXQueryServerString(dpy, 0, args[2]);
26186+ break;
26187+ }
26188+
26189+ case glXGetClientString_func:
26190+ {
26191+ ret_str = glXGetClientString(dpy, args[1]);
26192+ break;
26193+ }
26194+
26195+ case glXGetScreenDriver_func:
26196+ {
26197+ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
26198+
26199+ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
26200+ break;
26201+ }
26202+
26203+ case glXGetDriverConfig_func:
26204+ {
26205+ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
26206+
26207+ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
26208+ break;
26209+ }
26210+
26211+ case glXCreateContext_func:
26212+ {
26213+ int visualid = (int) args[1];
26214+ int fake_shareList = (int) args[2];
26215+
26216+ if (1 || display_function_call)
26217+ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
26218+ fake_shareList);
26219+
26220+ GLXContext shareList = get_association_fakecontext_glxcontext(
26221+ process, fake_shareList);
26222+ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
26223+ GLXContext ctxt;
26224+
26225+ if (vis) {
26226+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26227+ } else {
26228+ vis = get_default_visual(dpy);
26229+ int saved_visualid = vis->visualid;
26230+
26231+ vis->visualid = visualid ?: saved_visualid;
26232+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26233+ vis->visualid = saved_visualid;
26234+ }
26235+
26236+ if (ctxt) {
26237+ int fake_ctxt =++ process->next_available_context_number;
26238+
26239+ set_association_fakecontext_visual(process, fake_ctxt, vis);
26240+ set_association_fakecontext_glxcontext(process,
26241+ fake_ctxt, ctxt);
26242+ ret_int = fake_ctxt;
26243+
26244+ _create_context(process, ctxt, fake_ctxt, shareList,
26245+ fake_shareList);
26246+ } else {
26247+ ret_int = 0;
26248+ }
26249+
26250+ break;
26251+ }
26252+
26253+
26254+ case glXCreateNewContext_func:
26255+ {
26256+ GET_EXT_PTR(GLXContext, glXCreateNewContext,
26257+ (Display *, GLXFBConfig, int, GLXContext, int));
26258+ int client_fbconfig = args[1];
26259+
26260+ ret_int = 0;
26261+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26262+
26263+ if (fbconfig) {
26264+ int fake_shareList = args[3];
26265+ GLXContext shareList = get_association_fakecontext_glxcontext(
26266+ process, fake_shareList);
26267+ process->next_available_context_number++;
26268+ int fake_ctxt = process->next_available_context_number;
26269+ GLXContext ctxt = ptr_func_glXCreateNewContext(
26270+ dpy, fbconfig, args[2], shareList, args[4]);
26271+ set_association_fakecontext_glxcontext(
26272+ process, fake_ctxt, ctxt);
26273+ ret_int = fake_ctxt;
26274+
26275+ _create_context(process, ctxt, fake_ctxt, shareList,
26276+ fake_shareList);
26277+ }
26278+ break;
26279+ }
26280+
26281+ case glXCopyContext_func:
26282+ {
26283+ int fake_src_ctxt = (int) args[1];
26284+ int fake_dst_ctxt = (int) args[2];
26285+ GLXContext src_ctxt;
26286+ GLXContext dst_ctxt;
26287+
26288+ if (display_function_call)
26289+ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
26290+ fake_src_ctxt, fake_dst_ctxt);
26291+
26292+ if (!(src_ctxt = get_association_fakecontext_glxcontext(
26293+ process, fake_src_ctxt)))
26294+ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
26295+ fake_src_ctxt);
26296+ else
26297+ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
26298+ process, fake_dst_ctxt))) {
26299+ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
26300+ fake_dst_ctxt);
26301+ } else
26302+ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
26303+
26304+ break;
26305+ }
26306+
26307+ case glXDestroyContext_func:
26308+ {
26309+ int fake_ctxt = (int) args[1];
26310+
26311+ if (display_function_call)
26312+ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
26313+
26314+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26315+ process, fake_ctxt);
26316+ if (ctxt == NULL) {
26317+ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
26318+ (void *) (long) fake_ctxt);
26319+ } else {
26320+ int i;
26321+
26322+ for (i = 0; i < process->nb_states; i ++) {
26323+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26324+ if (ctxt == process->current_state->context)
26325+ process->current_state = &process->default_state;
26326+
26327+ int fake_shareList =
26328+ process->glstates[i]->fake_shareList;
26329+ process->glstates[i]->ref--;
26330+ if (process->glstates[i]->ref == 0) {
26331+ fprintf(stderr,
26332+ "destroy_gl_state fake_ctxt = %d\n",
26333+ process->glstates[i]->fake_ctxt);
26334+ destroy_gl_state(process->glstates[i]);
26335+ free(process->glstates[i]);
26336+ memmove(&process->glstates[i],
26337+ &process->glstates[i + 1],
26338+ (process->nb_states - i - 1) *
26339+ sizeof(GLState *));
26340+ process->nb_states --;
26341+ }
26342+
26343+ if (fake_shareList) {
26344+ for (i = 0; i < process->nb_states; i++) {
26345+ if (process->glstates[i]->fake_ctxt ==
26346+ fake_shareList) {
26347+ process->glstates[i]->ref--;
26348+ if (process->glstates[i]->ref == 0) {
26349+ fprintf(stderr,
26350+ "destroy_gl_state fake_ctxt = %d\n",
26351+ process->glstates[i]->
26352+ fake_ctxt);
26353+ destroy_gl_state(process->
26354+ glstates[i]);
26355+ free(process->glstates[i]);
26356+ memmove(&process->glstates[i],
26357+ &process->glstates[i + 1],
26358+ (process->nb_states - i - 1) *
26359+ sizeof(GLState *));
26360+ process->nb_states --;
26361+ }
26362+ break;
26363+ }
26364+ }
26365+ }
26366+
26367+ glXDestroyContext(dpy, ctxt);
26368+ unset_association_fakecontext_glxcontext(
26369+ process, fake_ctxt);
26370+
26371+ break;
26372+ }
26373+ }
26374+ }
26375+ break;
26376+ }
26377+
26378+ case glXQueryVersion_func:
26379+ {
26380+ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
26381+ break;
26382+ }
26383+
26384+ case glGetString_func:
26385+ {
26386+ ret_str = (char *) glGetString(args[0]);
26387+ break;
26388+ }
26389+
26390+ case glXMakeCurrent_func:
26391+ {
26392+ int i;
26393+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26394+ GLXDrawable drawable = 0;
26395+ int fake_ctxt = (int) args[2];
26396+
26397+ if (display_function_call)
26398+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
26399+ (void *) client_drawable, fake_ctxt);
26400+
26401+ if (client_drawable == 0 && fake_ctxt == 0) {
26402+ ret_int = glXMakeCurrent(dpy, 0, NULL);
26403+ process->current_state = &process->default_state;
26404+ } else if ((drawable = (GLXDrawable)
26405+ get_association_fakepbuffer_pbuffer(
26406+ process, client_drawable))) {
26407+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26408+ process, fake_ctxt);
26409+ if (ctxt == NULL) {
26410+ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
26411+ fake_ctxt);
26412+ ret_int = 0;
26413+ } else
26414+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26415+ } else {
26416+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26417+ process, fake_ctxt);
26418+ if (ctxt == NULL) {
26419+ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
26420+ ret_int = 0;
26421+ } else {
26422+ drawable = get_association_clientdrawable_serverdrawable(
26423+ process, client_drawable);
26424+ if (drawable == 0) {
26425+ XVisualInfo *vis = get_association_fakecontext_visual(
26426+ process, fake_ctxt);
26427+ if (vis == NULL)
26428+ vis = get_default_visual(dpy);
26429+ /* if (local_connection) drawable = client_drawable;
26430+ * else */
26431+ {
26432+ if ((int) (long) client_drawable ==
26433+ RootWindow(dpy, 0) &&
26434+ local_connection) {
26435+ drawable = (GLXDrawable) client_drawable;
26436+ } else {
26437+ drawable = create_window(
26438+ dpy, local_connection ?
26439+ (Window) client_drawable :
26440+ 0, vis, "", 0, 0, 16, 16);
26441+ }
26442+ }
26443+ set_association_clientdrawable_serverdrawable(process,
26444+ client_drawable, drawable);
26445+ }
26446+
26447+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26448+ }
26449+ }
26450+
26451+ if (ret_int) {
26452+ for (i = 0; i < process->nb_states; i ++) {
26453+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26454+ /* HACK !!! REMOVE */
26455+ process->current_state = process->glstates[i];
26456+ process->current_state->drawable = drawable;
26457+ break;
26458+ }
26459+ }
26460+
26461+ if (i == process->nb_states) {
26462+ fprintf(stderr, "error remembering the new context\n");
26463+ exit(-1);
26464+ }
26465+ }
26466+ break;
26467+ }
26468+
26469+ case glXSwapBuffers_func:
26470+ {
26471+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26472+
26473+ if (display_function_call)
26474+ fprintf(stderr, "client_drawable=%p\n", client_drawable);
26475+
26476+ GLXDrawable drawable =
26477+ get_association_clientdrawable_serverdrawable(
26478+ process, client_drawable);
26479+ if (!drawable) {
26480+ fprintf(stderr, "unknown client_drawable (%p) !\n",
26481+ (void *) client_drawable);
26482+ } else {
26483+#ifdef CURSOR_TRICK
26484+ if (client_cursor.pixels && local_connection == 0) {
26485+ glPushAttrib(GL_ALL_ATTRIB_BITS);
26486+ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
26487+
26488+ glMatrixMode(GL_PROJECTION);
26489+ glPushMatrix();
26490+ glLoadIdentity();
26491+ glOrtho(0, process->currentDrawablePos.width,
26492+ process->currentDrawablePos.height, 0, -1, 1);
26493+ glMatrixMode(GL_MODELVIEW);
26494+ glPushMatrix();
26495+ glLoadIdentity();
26496+ glPixelZoom(1, -1);
26497+
26498+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
26499+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
26500+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
26501+ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
26502+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
26503+ glShadeModel(GL_SMOOTH);
26504+
26505+ glEnable(GL_BLEND);
26506+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
26507+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
26508+
26509+ int i, numUnits;
26510+
26511+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
26512+ for (i = 0; i < numUnits; i++) {
26513+ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
26514+ glDisable(GL_TEXTURE_1D);
26515+ glDisable(GL_TEXTURE_2D);
26516+ glDisable(GL_TEXTURE_3D);
26517+ }
26518+ glDisable(GL_ALPHA_TEST);
26519+ glDisable(GL_DEPTH_TEST);
26520+ glDisable(GL_STENCIL_TEST);
26521+ glDisable(GL_SCISSOR_TEST);
26522+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
26523+ glDisable(GL_VERTEX_PROGRAM_ARB);
26524+ do_glUseProgramObjectARB(0);
26525+
26526+ // memset(client_cursor.pixels, 255, client_cursor.width
26527+ // * client_cursor.height * sizeof(int));
26528+
26529+ glRasterPos2d(client_cursor.x - client_cursor.xhot,
26530+ client_cursor.y - client_cursor.yhot);
26531+ glDrawPixels(client_cursor.width, client_cursor.height,
26532+ GL_BGRA, GL_UNSIGNED_BYTE,
26533+ client_cursor.pixels);
26534+
26535+ glMatrixMode(GL_MODELVIEW);
26536+ glPopMatrix();
26537+
26538+ glMatrixMode(GL_PROJECTION);
26539+ glPopMatrix();
26540+
26541+ glPopClientAttrib();
26542+ glPopAttrib();
26543+ }
26544+#endif
26545+
26546+ ////////// HORRIBLE HORRIBLE HACK
26547+ if (drawable != active_win && active_win) {
26548+ glXMakeCurrent(dpy, active_win,
26549+ processes[0].current_state->context);
26550+ glXSwapBuffers(dpy, active_win);
26551+ glXMakeCurrent(dpy, process->current_state->drawable,
26552+ process->current_state->context);
26553+ }
26554+ glXSwapBuffers(dpy, drawable);
26555+ }
26556+ break;
26557+ }
26558+
26559+ case glXIsDirect_func:
26560+ {
26561+ int fake_ctxt = (int) args[1];
26562+
26563+ if (display_function_call)
26564+ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
26565+ GLXContext ctxt =
26566+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26567+ if (ctxt == NULL) {
26568+ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
26569+ ret_char = False;
26570+ } else {
26571+ ret_char = glXIsDirect(dpy, ctxt);
26572+ }
26573+ break;
26574+ }
26575+
26576+ case glXGetConfig_func:
26577+ {
26578+ int visualid = args[1];
26579+ XVisualInfo *vis = NULL;
26580+
26581+ if (visualid)
26582+ vis = get_visual_info_from_visual_id(dpy, visualid);
26583+ if (vis == NULL)
26584+ vis = get_default_visual(dpy);
26585+ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
26586+ break;
26587+ }
26588+
26589+ case glXGetConfig_extended_func:
26590+ {
26591+ int visualid = args[1];
26592+ int n = args[2];
26593+ int i;
26594+ XVisualInfo *vis = NULL;
26595+ int *attribs = (int *) args[3];
26596+ int *values = (int *) args[4];
26597+ int *res = (int *) args[5];
26598+
26599+ if (visualid)
26600+ vis = get_visual_info_from_visual_id(dpy, visualid);
26601+ if (vis == NULL)
26602+ vis = get_default_visual(dpy);
26603+
26604+ for (i = 0; i < n; i++) {
26605+ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
26606+ }
26607+ break;
26608+ }
26609+
26610+ case glXUseXFont_func:
26611+ {
26612+ /* implementation is client-side only :-) */
26613+ break;
26614+ }
26615+
26616+ case glXQueryExtension_func:
26617+ {
26618+ ret_int =
26619+ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
26620+ break;
26621+ }
26622+
26623+ case glXChooseFBConfig_func:
26624+ {
26625+ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
26626+ (Display *, int, int *, int *));
26627+ if (process->nfbconfig == MAX_FBCONFIG) {
26628+ *(int *) args[3] = 0;
26629+ ret_int = 0;
26630+ } else {
26631+ GLXFBConfig *fbconfigs =
26632+ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
26633+ (int *) args[3]);
26634+ if (fbconfigs) {
26635+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26636+ process->fbconfigs_max[process->nfbconfig] =
26637+ *(int *) args[3];
26638+ process->nfbconfig++;
26639+ ret_int = 1 + process->nfbconfig_total;
26640+ process->nfbconfig_total +=
26641+ process->fbconfigs_max[process->nfbconfig];
26642+ } else {
26643+ ret_int = 0;
26644+ }
26645+ }
26646+ break;
26647+ }
26648+
26649+ case glXChooseFBConfigSGIX_func:
26650+ {
26651+ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
26652+ (Display *, int, int *, int *));
26653+ if (process->nfbconfig == MAX_FBCONFIG) {
26654+ *(int *) args[3] = 0;
26655+ ret_int = 0;
26656+ } else {
26657+ GLXFBConfigSGIX *fbconfigs =
26658+ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
26659+ (int *) args[2],
26660+ (int *) args[3]);
26661+ if (fbconfigs) {
26662+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26663+ process->fbconfigs_max[process->nfbconfig] =
26664+ *(int *) args[3];
26665+ process->nfbconfig++;
26666+ ret_int = 1 + process->nfbconfig_total;
26667+ process->nfbconfig_total +=
26668+ process->fbconfigs_max[process->nfbconfig];
26669+ } else {
26670+ ret_int = 0;
26671+ }
26672+ }
26673+ break;
26674+ }
26675+
26676+ case glXGetFBConfigs_func:
26677+ {
26678+ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
26679+ (Display *, int, int *));
26680+ if (process->nfbconfig == MAX_FBCONFIG) {
26681+ *(int *) args[2] = 0;
26682+ ret_int = 0;
26683+ } else {
26684+ GLXFBConfig *fbconfigs =
26685+ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
26686+ if (fbconfigs) {
26687+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26688+ process->fbconfigs_max[process->nfbconfig] =
26689+ *(int *) args[2];
26690+ process->nfbconfig++;
26691+ ret_int = 1 + process->nfbconfig_total;
26692+ process->nfbconfig_total +=
26693+ process->fbconfigs_max[process->nfbconfig];
26694+ } else {
26695+ ret_int = 0;
26696+ }
26697+ }
26698+ break;
26699+ }
26700+
26701+ case glXCreatePbuffer_func:
26702+ {
26703+ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
26704+ (Display *, GLXFBConfig, int *));
26705+ int client_fbconfig = args[1];
26706+
26707+ ret_int = 0;
26708+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26709+
26710+ if (fbconfig) {
26711+ GLXPbuffer pbuffer =
26712+ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
26713+ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
26714+ if (pbuffer) {
26715+ ClientGLXDrawable fake_pbuffer = to_drawable(
26716+ ++ process->next_available_pbuffer_number);
26717+
26718+ set_association_fakepbuffer_pbuffer(
26719+ process, fake_pbuffer, pbuffer);
26720+ fprintf(stderr,
26721+ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
26722+ fake_pbuffer, (int) (long) pbuffer);
26723+ ret_int = (int) (long) fake_pbuffer;
26724+ }
26725+ }
26726+ break;
26727+ }
26728+
26729+ case glXCreateGLXPbufferSGIX_func:
26730+ {
26731+ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
26732+ (Display *, GLXFBConfig, int, int, int *));
26733+ int client_fbconfig = args[1];
26734+
26735+ ret_int = 0;
26736+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26737+
26738+ if (fbconfig) {
26739+ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
26740+ dpy, fbconfig,
26741+ args[2], args[3], (int *) args[4]);
26742+ if (pbuffer) {
26743+ ClientGLXDrawable fake_pbuffer = to_drawable(
26744+ ++ process->next_available_pbuffer_number);
26745+
26746+ set_association_fakepbuffer_pbuffer(
26747+ process, fake_pbuffer, pbuffer);
26748+ ret_int = (int) (long) fake_pbuffer;
26749+ }
26750+ }
26751+ break;
26752+ }
26753+
26754+ case glXDestroyPbuffer_func:
26755+ {
26756+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
26757+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26758+
26759+ if (display_function_call)
26760+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26761+
26762+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26763+ process, fake_pbuffer);
26764+ if (pbuffer == 0) {
26765+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26766+ fake_pbuffer);
26767+ } else {
26768+ if (!is_gl_vendor_ati(dpy))
26769+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
26770+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26771+ }
26772+ break;
26773+ }
26774+
26775+ case glXDestroyGLXPbufferSGIX_func:
26776+ {
26777+ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
26778+ (Display *, GLXPbuffer));
26779+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26780+
26781+ if (display_function_call)
26782+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26783+
26784+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26785+ process, fake_pbuffer);
26786+ if (pbuffer == 0) {
26787+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26788+ fake_pbuffer);
26789+ } else {
26790+ if (!is_gl_vendor_ati(dpy))
26791+ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
26792+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26793+ }
26794+ break;
26795+ }
26796+
26797+ case glXBindTexImageATI_func:
26798+ {
26799+ GET_EXT_PTR(void, glXBindTexImageATI,
26800+ (Display *, GLXPbuffer, int));
26801+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26802+
26803+ if (display_function_call)
26804+ fprintf(stderr, "fake_pbuffer=%p\n",
26805+ fake_pbuffer);
26806+
26807+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26808+ process, fake_pbuffer);
26809+ if (pbuffer == 0) {
26810+ fprintf(stderr,
26811+ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
26812+ fake_pbuffer);
26813+ } else {
26814+ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
26815+ }
26816+ break;
26817+ }
26818+
26819+ case glXReleaseTexImageATI_func:
26820+ {
26821+ GET_EXT_PTR(void, glXReleaseTexImageATI,
26822+ (Display *, GLXPbuffer, int));
26823+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26824+
26825+ if (display_function_call)
26826+ fprintf(stderr, "fake_pbuffer=%d\n",
26827+ (int) (long) fake_pbuffer);
26828+
26829+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26830+ process, fake_pbuffer);
26831+ if (pbuffer == 0) {
26832+ fprintf(stderr,
26833+ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
26834+ (int) (long) fake_pbuffer);
26835+ } else {
26836+ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
26837+ }
26838+ break;
26839+ }
26840+
26841+ case glXBindTexImageARB_func:
26842+ {
26843+ GET_EXT_PTR(Bool, glXBindTexImageARB,
26844+ (Display *, GLXPbuffer, int));
26845+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26846+
26847+ if (display_function_call)
26848+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26849+
26850+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26851+ process, fake_pbuffer);
26852+ if (pbuffer == 0) {
26853+ fprintf(stderr,
26854+ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
26855+ fake_pbuffer);
26856+ ret_int = 0;
26857+ } else {
26858+ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
26859+ }
26860+ break;
26861+ }
26862+
26863+ case glXReleaseTexImageARB_func:
26864+ {
26865+ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
26866+ (Display *, GLXPbuffer, int));
26867+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26868+
26869+ if (display_function_call)
26870+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26871+
26872+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26873+ process, fake_pbuffer);
26874+ if (pbuffer == 0) {
26875+ fprintf(stderr,
26876+ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
26877+ fake_pbuffer);
26878+ ret_int = 0;
26879+ } else {
26880+ ret_int =
26881+ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
26882+ }
26883+ break;
26884+ }
26885+
26886+ case glXGetFBConfigAttrib_func:
26887+ {
26888+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26889+ (Display *, GLXFBConfig, int, int *));
26890+ int client_fbconfig = args[1];
26891+
26892+ ret_int = 0;
26893+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26894+
26895+ if (fbconfig)
26896+ ret_int =
26897+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
26898+ (int *) args[3]);
26899+ break;
26900+ }
26901+
26902+ case glXGetFBConfigAttrib_extended_func:
26903+ {
26904+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26905+ (Display *, GLXFBConfig, int, int *));
26906+ int client_fbconfig = args[1];
26907+ int n = args[2];
26908+ int i;
26909+ int *attribs = (int *) args[3];
26910+ int *values = (int *) args[4];
26911+ int *res = (int *) args[5];
26912+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26913+
26914+ for (i = 0; i < n; i++) {
26915+ if (fbconfig) {
26916+ res[i] =
26917+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
26918+ attribs[i], &values[i]);
26919+ } else {
26920+ res[i] = 0;
26921+ }
26922+ }
26923+ break;
26924+ }
26925+
26926+ case glXGetFBConfigAttribSGIX_func:
26927+ {
26928+ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
26929+ (Display *, GLXFBConfigSGIX, int, int *));
26930+ int client_fbconfig = args[1];
26931+
26932+ ret_int = 0;
26933+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26934+
26935+ if (fbconfig)
26936+ ret_int =
26937+ ptr_func_glXGetFBConfigAttribSGIX(dpy,
26938+ (GLXFBConfigSGIX)
26939+ fbconfig, args[2],
26940+ (int *) args[3]);
26941+ break;
26942+ }
26943+
26944+ case glXQueryContext_func:
26945+ {
26946+ GET_EXT_PTR(int, glXQueryContext,
26947+ (Display *, GLXContext, int, int *));
26948+ int fake_ctxt = (int) args[1];
26949+
26950+ if (display_function_call)
26951+ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
26952+ GLXContext ctxt =
26953+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26954+ if (ctxt == NULL) {
26955+ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
26956+ ret_int = 0;
26957+ } else {
26958+ ret_int =
26959+ ptr_func_glXQueryContext(dpy, ctxt, args[2],
26960+ (int *) args[3]);
26961+ }
26962+ break;
26963+ }
26964+
26965+ case glXQueryDrawable_func:
26966+ {
26967+ GET_EXT_PTR(void, glXQueryDrawable,
26968+ (Display *, GLXDrawable, int, int *));
26969+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26970+ GLXDrawable drawable =
26971+ get_association_clientdrawable_serverdrawable(
26972+ process, client_drawable);
26973+
26974+ if (display_function_call)
26975+ fprintf(stderr, "client_drawable=%p\n",
26976+ client_drawable);
26977+
26978+ if (!drawable)
26979+ fprintf(stderr, "invalid client_drawable (%p) !\n",
26980+ client_drawable);
26981+ else
26982+ ptr_func_glXQueryDrawable(dpy, drawable,
26983+ args[2], (int *) args[3]);
26984+
26985+ break;
26986+ }
26987+
26988+ case glXQueryGLXPbufferSGIX_func:
26989+ {
26990+ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
26991+ (Display *, GLXFBConfigSGIX, int, int *));
26992+ int client_fbconfig = args[1];
26993+
26994+ ret_int = 0;
26995+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26996+
26997+ if (fbconfig)
26998+ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
26999+ (GLXFBConfigSGIX) fbconfig,
27000+ args[2], (int *) args[3]);
27001+ break;
27002+ }
27003+
27004+ case glXCreateContextWithConfigSGIX_func:
27005+ {
27006+ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
27007+ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
27008+ int client_fbconfig = args[1];
27009+
27010+ ret_int = 0;
27011+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
27012+
27013+ if (fbconfig) {
27014+ GLXContext shareList = get_association_fakecontext_glxcontext(
27015+ process, (int) args[3]);
27016+ process->next_available_context_number++;
27017+ int fake_ctxt = process->next_available_context_number;
27018+ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
27019+ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
27020+ shareList, args[4]);
27021+ set_association_fakecontext_glxcontext(
27022+ process, fake_ctxt, ctxt);
27023+ ret_int = fake_ctxt;
27024+ }
27025+ break;
27026+ }
27027+
27028+ case glXGetVisualFromFBConfig_func:
27029+ {
27030+ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
27031+ (Display *, GLXFBConfig));
27032+ int client_fbconfig = args[1];
27033+
27034+ ret_int = 0;
27035+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
27036+
27037+ if (fbconfig) {
27038+ XVisualInfo *vis =
27039+ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
27040+ ret_int = (vis) ? vis->visualid : 0;
27041+ if (vis) {
27042+ tabAssocAttribListVisual =
27043+ realloc(tabAssocAttribListVisual,
27044+ sizeof(AssocAttribListVisual) *
27045+ (nTabAssocAttribListVisual + 1));
27046+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
27047+ attribListLength = 0;
27048+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
27049+ attribList = NULL;
27050+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
27051+ visInfo = vis;
27052+ nTabAssocAttribListVisual++;
27053+ }
27054+ if (display_function_call)
27055+ fprintf(stderr, "visualid = %d\n", ret_int);
27056+ }
27057+ break;
27058+ }
27059+
27060+ case glXSwapIntervalSGI_func:
27061+ {
27062+ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
27063+
27064+ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
27065+ break;
27066+ }
27067+
27068+ case glXGetProcAddress_fake_func:
27069+ {
27070+ if (display_function_call)
27071+ fprintf(stderr, "%s\n", (char *) args[0]);
27072+ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
27073+ break;
27074+ }
27075+
27076+ case glXGetProcAddress_global_fake_func:
27077+ {
27078+ int nbElts = args[0];
27079+ char *huge_buffer = (char *) args[1];
27080+ char *result = (char *) args[2];
27081+ int i;
27082+
27083+ for (i = 0; i < nbElts; i++) {
27084+ int len = strlen(huge_buffer);
27085+
27086+ result[i] =
27087+ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
27088+ NULL;
27089+ huge_buffer += len + 1;
27090+ }
27091+ break;
27092+ }
27093+
27094+/* Begin of texture stuff */
27095+ case glBindTexture_func:
27096+ case glBindTextureEXT_func:
27097+ {
27098+ int target = args[0];
27099+ unsigned int client_texture = args[1];
27100+ unsigned int server_texture;
27101+
27102+ if (client_texture == 0) {
27103+ glBindTexture(target, 0);
27104+ } else {
27105+ alloc_value(process->current_state->textureAllocator,
27106+ client_texture);
27107+ server_texture =
27108+ process->current_state->tabTextures[client_texture];
27109+ if (server_texture == 0) {
27110+ glGenTextures(1, &server_texture);
27111+ process->current_state->tabTextures[client_texture] =
27112+ server_texture;
27113+ }
27114+ glBindTexture(target, server_texture);
27115+ }
27116+ break;
27117+ }
27118+
27119+ case glGenTextures_fake_func:
27120+ {
27121+ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
27122+ int i;
27123+ int n = args[0];
27124+ unsigned int *clientTabTextures = malloc(n * sizeof(int));
27125+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
27126+
27127+ alloc_range(process->current_state->textureAllocator, n,
27128+ clientTabTextures);
27129+
27130+ ptr_func_glGenTextures(n, serverTabTextures);
27131+ for (i = 0; i < n; i++) {
27132+ process->current_state->tabTextures[clientTabTextures[i]] =
27133+ serverTabTextures[i];
27134+ }
27135+
27136+ free(clientTabTextures);
27137+ free(serverTabTextures);
27138+ break;
27139+ }
27140+
27141+
27142+ case glDeleteTextures_func:
27143+ {
27144+ GET_EXT_PTR(void, glDeleteTextures,
27145+ (GLsizei n, const GLuint *textures));
27146+ int i;
27147+ int n = args[0];
27148+ unsigned int *clientTabTextures = (unsigned int *) args[1];
27149+
27150+ delete_range(process->current_state->textureAllocator, n,
27151+ clientTabTextures);
27152+
27153+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
27154+
27155+ for (i = 0; i < n; i++) {
27156+ serverTabTextures[i] =
27157+ get_server_texture(process, clientTabTextures[i]);
27158+ }
27159+ ptr_func_glDeleteTextures(n, serverTabTextures);
27160+ for (i = 0; i < n; i++) {
27161+ process->current_state->tabTextures[clientTabTextures[i]] = 0;
27162+ }
27163+ free(serverTabTextures);
27164+ break;
27165+ }
27166+
27167+ case glPrioritizeTextures_func:
27168+ {
27169+ GET_EXT_PTR(void, glPrioritizeTextures,
27170+ (GLsizei n, const GLuint *textures,
27171+ const GLclampf *priorities));
27172+
27173+ int i;
27174+ int n = args[0];
27175+ unsigned int *textures = (unsigned int *) args[1];
27176+
27177+ for (i = 0; i < n; i++) {
27178+ textures[i] = get_server_texture(process, textures[i]);
27179+ }
27180+ ptr_func_glPrioritizeTextures(n, textures,
27181+ (const GLclampf *) args[2]);
27182+ break;
27183+ }
27184+
27185+ case glAreTexturesResident_func:
27186+ {
27187+ GET_EXT_PTR(void, glAreTexturesResident,
27188+ (GLsizei n, const GLuint *textures,
27189+ GLboolean *residences));
27190+ int i;
27191+ int n = args[0];
27192+ unsigned int *textures = (unsigned int *) args[1];
27193+
27194+ for (i = 0; i < n; i++) {
27195+ textures[i] = get_server_texture(process, textures[i]);
27196+ }
27197+ ptr_func_glAreTexturesResident(n, textures,
27198+ (GLboolean *) args[2]);
27199+ break;
27200+ }
27201+
27202+ case glIsTexture_func:
27203+ case glIsTextureEXT_func:
27204+ {
27205+ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
27206+ unsigned int client_texture = args[0];
27207+ unsigned int server_texture =
27208+ get_server_texture(process, client_texture);
27209+ if (server_texture)
27210+ ret_char = ptr_func_glIsTexture(server_texture);
27211+ else
27212+ ret_char = 0;
27213+ break;
27214+ }
27215+
27216+ case glFramebufferTexture1DEXT_func:
27217+ {
27218+ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
27219+ (int, int, int, int, int));
27220+ unsigned int client_texture = args[3];
27221+ unsigned int server_texture =
27222+ get_server_texture(process, client_texture);
27223+ if (server_texture)
27224+ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
27225+ server_texture, args[4]);
27226+ break;
27227+ }
27228+
27229+ case glFramebufferTexture2DEXT_func:
27230+ {
27231+ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
27232+ (int, int, int, int, int));
27233+ unsigned int client_texture = args[3];
27234+ unsigned int server_texture =
27235+ get_server_texture(process, client_texture);
27236+ if (server_texture)
27237+ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
27238+ server_texture, args[4]);
27239+ break;
27240+ }
27241+
27242+ case glFramebufferTexture3DEXT_func:
27243+ {
27244+ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
27245+ (int, int, int, int, int, int));
27246+ unsigned int client_texture = args[3];
27247+ unsigned int server_texture =
27248+ get_server_texture(process, client_texture);
27249+ if (server_texture)
27250+ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
27251+ server_texture, args[4],
27252+ args[5]);
27253+ break;
27254+ }
27255+/* End of texture stuff */
27256+
27257+/* Begin of list stuff */
27258+ case glIsList_func:
27259+ {
27260+ unsigned int client_list = args[0];
27261+ unsigned int server_list = get_server_list(process, client_list);
27262+
27263+ if (server_list)
27264+ ret_char = glIsList(server_list);
27265+ else
27266+ ret_char = 0;
27267+ break;
27268+ }
27269+
27270+ case glDeleteLists_func:
27271+ {
27272+ int i;
27273+ unsigned int first_client = args[0];
27274+ int n = args[1];
27275+
27276+ unsigned int first_server =
27277+ get_server_list(process, first_client);
27278+ for (i = 0; i < n; i++) {
27279+ if (get_server_list(process, first_client + i) !=
27280+ first_server + i)
27281+ break;
27282+ }
27283+ if (i == n) {
27284+ glDeleteLists(first_server, n);
27285+ } else {
27286+ for (i = 0; i < n; i++) {
27287+ glDeleteLists(get_server_list(process, first_client + i),
27288+ 1);
27289+ }
27290+ }
27291+
27292+ for (i = 0; i < n; i++) {
27293+ process->current_state->tabLists[first_client + i] = 0;
27294+ }
27295+ delete_consecutive_values(process->current_state->listAllocator,
27296+ first_client, n);
27297+ break;
27298+ }
27299+
27300+ case glGenLists_fake_func:
27301+ {
27302+ int i;
27303+ int n = args[0];
27304+ unsigned int server_first = glGenLists(n);
27305+
27306+ if (server_first) {
27307+ unsigned int client_first =
27308+ alloc_range(process->current_state->listAllocator, n,
27309+ NULL);
27310+ for (i = 0; i < n; i++) {
27311+ process->current_state->tabLists[client_first + i] =
27312+ server_first + i;
27313+ }
27314+ }
27315+ break;
27316+ }
27317+
27318+ case glNewList_func:
27319+ {
27320+ unsigned int client_list = args[0];
27321+ int mode = args[1];
27322+
27323+ alloc_value(process->current_state->listAllocator, client_list);
27324+ unsigned int server_list = get_server_list(process, client_list);
27325+
27326+ if (server_list == 0) {
27327+ server_list = glGenLists(1);
27328+ process->current_state->tabLists[client_list] = server_list;
27329+ }
27330+ glNewList(server_list, mode);
27331+ break;
27332+ }
27333+
27334+ case glCallList_func:
27335+ {
27336+ unsigned int client_list = args[0];
27337+ unsigned int server_list = get_server_list(process, client_list);
27338+
27339+ glCallList(server_list);
27340+ break;
27341+ }
27342+
27343+ case glCallLists_func:
27344+ {
27345+ int i;
27346+ int n = args[0];
27347+ int type = args[1];
27348+ const GLvoid *lists = (const GLvoid *) args[2];
27349+ int *new_lists = malloc(sizeof(int) * n);
27350+
27351+ for (i = 0; i < n; i++) {
27352+ new_lists[i] =
27353+ get_server_list(process, translate_id(i, type, lists));
27354+ }
27355+ glCallLists(n, GL_UNSIGNED_INT, new_lists);
27356+ free(new_lists);
27357+ break;
27358+ }
27359+
27360+
27361+/* End of list stuff */
27362+
27363+/* Begin of buffer stuff */
27364+ case glBindBufferARB_func:
27365+ {
27366+ GET_EXT_PTR(void, glBindBufferARB, (int, int));
27367+ int target = args[0];
27368+ unsigned int client_buffer = args[1];
27369+ unsigned int server_buffer;
27370+
27371+ if (client_buffer == 0) {
27372+ ptr_func_glBindBufferARB(target, 0);
27373+ } else {
27374+ server_buffer = get_server_buffer(process, client_buffer);
27375+ ptr_func_glBindBufferARB(target, server_buffer);
27376+ }
27377+ break;
27378+ }
27379+
27380+ case glGenBuffersARB_fake_func:
27381+ {
27382+ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
27383+ int i;
27384+ int n = args[0];
27385+ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
27386+ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
27387+
27388+ alloc_range(process->current_state->bufferAllocator, n,
27389+ clientTabBuffers);
27390+
27391+ ptr_func_glGenBuffersARB(n, serverTabBuffers);
27392+ for (i = 0; i < n; i++) {
27393+ process->current_state->tabBuffers[clientTabBuffers[i]] =
27394+ serverTabBuffers[i];
27395+ }
27396+
27397+ free(clientTabBuffers);
27398+ free(serverTabBuffers);
27399+ break;
27400+ }
27401+
27402+
27403+ case glDeleteBuffersARB_func:
27404+ {
27405+ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
27406+ int i;
27407+ int n = args[0];
27408+ unsigned int *clientTabBuffers = (unsigned int *) args[1];
27409+
27410+ delete_range(process->current_state->bufferAllocator, n,
27411+ clientTabBuffers);
27412+
27413+ int *serverTabBuffers = malloc(n * sizeof(int));
27414+
27415+ for (i = 0; i < n; i++) {
27416+ serverTabBuffers[i] =
27417+ get_server_buffer(process, clientTabBuffers[i]);
27418+ }
27419+ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
27420+ for (i = 0; i < n; i++) {
27421+ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
27422+ }
27423+ free(serverTabBuffers);
27424+ break;
27425+ }
27426+
27427+ case glIsBufferARB_func:
27428+ {
27429+ GET_EXT_PTR(int, glIsBufferARB, (int));
27430+ unsigned int client_buffer = args[0];
27431+ unsigned int server_buffer =
27432+ get_server_buffer(process, client_buffer);
27433+ if (server_buffer)
27434+ ret_int = ptr_func_glIsBufferARB(server_buffer);
27435+ else
27436+ ret_int = 0;
27437+ break;
27438+ }
27439+
27440+/* End of buffer stuff */
27441+
27442+ case glShaderSourceARB_fake_func:
27443+ {
27444+ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
27445+ int size = args[1];
27446+ int i;
27447+ int acc_length = 0;
27448+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27449+ int *tab_length = (int *) args[3];
27450+
27451+ for (i = 0; i < size; i++) {
27452+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27453+ acc_length += tab_length[i];
27454+ }
27455+ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
27456+ tab_length);
27457+ free(tab_prog);
27458+ break;
27459+ }
27460+
27461+ case glShaderSource_fake_func:
27462+ {
27463+ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
27464+ int size = args[1];
27465+ int i;
27466+ int acc_length = 0;
27467+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27468+ int *tab_length = (int *) args[3];
27469+
27470+ for (i = 0; i < size; i++) {
27471+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27472+ acc_length += tab_length[i];
27473+ }
27474+ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
27475+ free(tab_prog);
27476+ break;
27477+ }
27478+
27479+ case glVertexPointer_fake_func:
27480+ {
27481+ int offset = args[0];
27482+ int size = args[1];
27483+ int type = args[2];
27484+ int stride = args[3];
27485+ int bytes_size = args[4];
27486+
27487+ process->current_state->vertexPointerSize =
27488+ MAX(process->current_state->vertexPointerSize,
27489+ offset + bytes_size);
27490+ process->current_state->vertexPointer =
27491+ realloc(process->current_state->vertexPointer,
27492+ process->current_state->vertexPointerSize);
27493+ memcpy(process->current_state->vertexPointer + offset,
27494+ (void *) args[5], bytes_size);
27495+ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
27496+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27497+ glVertexPointer(size, type, stride,
27498+ process->current_state->vertexPointer);
27499+ break;
27500+ }
27501+
27502+ case glNormalPointer_fake_func:
27503+ {
27504+ int offset = args[0];
27505+ int type = args[1];
27506+ int stride = args[2];
27507+ int bytes_size = args[3];
27508+
27509+ process->current_state->normalPointerSize =
27510+ MAX(process->current_state->normalPointerSize,
27511+ offset + bytes_size);
27512+ process->current_state->normalPointer =
27513+ realloc(process->current_state->normalPointer,
27514+ process->current_state->normalPointerSize);
27515+ memcpy(process->current_state->normalPointer + offset,
27516+ (void *) args[4], bytes_size);
27517+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
27518+ // byte_size=%d\n", type, stride, bytes_size);
27519+ glNormalPointer(type, stride,
27520+ process->current_state->normalPointer);
27521+ break;
27522+ }
27523+
27524+ case glIndexPointer_fake_func:
27525+ {
27526+ int offset = args[0];
27527+ int type = args[1];
27528+ int stride = args[2];
27529+ int bytes_size = args[3];
27530+
27531+ process->current_state->indexPointerSize =
27532+ MAX(process->current_state->indexPointerSize,
27533+ offset + bytes_size);
27534+ process->current_state->indexPointer =
27535+ realloc(process->current_state->indexPointer,
27536+ process->current_state->indexPointerSize);
27537+ memcpy(process->current_state->indexPointer + offset,
27538+ (void *) args[4], bytes_size);
27539+ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
27540+ // byte_size=%d\n", type, stride, bytes_size);
27541+ glIndexPointer(type, stride,
27542+ process->current_state->indexPointer);
27543+ break;
27544+ }
27545+
27546+ case glEdgeFlagPointer_fake_func:
27547+ {
27548+ int offset = args[0];
27549+ int stride = args[1];
27550+ int bytes_size = args[2];
27551+
27552+ process->current_state->edgeFlagPointerSize =
27553+ MAX(process->current_state->edgeFlagPointerSize,
27554+ offset + bytes_size);
27555+ process->current_state->edgeFlagPointer =
27556+ realloc(process->current_state->edgeFlagPointer,
27557+ process->current_state->edgeFlagPointerSize);
27558+ memcpy(process->current_state->edgeFlagPointer + offset,
27559+ (void *) args[3], bytes_size);
27560+ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
27561+ // bytes_size=%d\n", stride, bytes_size);
27562+ glEdgeFlagPointer(stride,
27563+ process->current_state->edgeFlagPointer);
27564+ break;
27565+ }
27566+
27567+ case glVertexAttribPointerARB_fake_func:
27568+ {
27569+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27570+ (int, int, int, int, int, void *));
27571+ int offset = args[0];
27572+ int index = args[1];
27573+ int size = args[2];
27574+ int type = args[3];
27575+ int normalized = args[4];
27576+ int stride = args[5];
27577+ int bytes_size = args[6];
27578+
27579+ process->current_state->vertexAttribPointerSize[index] =
27580+ MAX(process->current_state->vertexAttribPointerSize[index],
27581+ offset + bytes_size);
27582+ process->current_state->vertexAttribPointer[index] =
27583+ realloc(process->current_state->vertexAttribPointer[index],
27584+ process->current_state->
27585+ vertexAttribPointerSize[index]);
27586+ memcpy(process->current_state->vertexAttribPointer[index] +
27587+ offset, (void *) args[7], bytes_size);
27588+ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
27589+ stride,
27590+ process->current_state->
27591+ vertexAttribPointer[index]);
27592+ break;
27593+ }
27594+
27595+ case glVertexAttribPointerNV_fake_func:
27596+ {
27597+ GET_EXT_PTR(void, glVertexAttribPointerNV,
27598+ (int, int, int, int, void *));
27599+ int offset = args[0];
27600+ int index = args[1];
27601+ int size = args[2];
27602+ int type = args[3];
27603+ int stride = args[4];
27604+ int bytes_size = args[5];
27605+
27606+ process->current_state->vertexAttribPointerNVSize[index] =
27607+ MAX(process->current_state->vertexAttribPointerNVSize[index],
27608+ offset + bytes_size);
27609+ process->current_state->vertexAttribPointerNV[index] =
27610+ realloc(process->current_state->vertexAttribPointerNV[index],
27611+ process->current_state->
27612+ vertexAttribPointerNVSize[index]);
27613+ memcpy(process->current_state->vertexAttribPointerNV[index] +
27614+ offset, (void *) args[6], bytes_size);
27615+ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
27616+ process->current_state->
27617+ vertexAttribPointerNV[index]);
27618+ break;
27619+ }
27620+
27621+ case glColorPointer_fake_func:
27622+ {
27623+ int offset = args[0];
27624+ int size = args[1];
27625+ int type = args[2];
27626+ int stride = args[3];
27627+ int bytes_size = args[4];
27628+
27629+ process->current_state->colorPointerSize =
27630+ MAX(process->current_state->colorPointerSize,
27631+ offset + bytes_size);
27632+ process->current_state->colorPointer =
27633+ realloc(process->current_state->colorPointer,
27634+ process->current_state->colorPointerSize);
27635+ memcpy(process->current_state->colorPointer + offset,
27636+ (void *) args[5], bytes_size);
27637+ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
27638+ // bytes_size);
27639+ glColorPointer(size, type, stride,
27640+ process->current_state->colorPointer);
27641+
27642+ break;
27643+ }
27644+
27645+ case glSecondaryColorPointer_fake_func:
27646+ {
27647+ GET_EXT_PTR(void, glSecondaryColorPointer,
27648+ (int, int, int, void *));
27649+ int offset = args[0];
27650+ int size = args[1];
27651+ int type = args[2];
27652+ int stride = args[3];
27653+ int bytes_size = args[4];
27654+
27655+ process->current_state->secondaryColorPointerSize =
27656+ MAX(process->current_state->secondaryColorPointerSize,
27657+ offset + bytes_size);
27658+ process->current_state->secondaryColorPointer =
27659+ realloc(process->current_state->secondaryColorPointer,
27660+ process->current_state->secondaryColorPointerSize);
27661+ memcpy(process->current_state->secondaryColorPointer + offset,
27662+ (void *) args[5], bytes_size);
27663+ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
27664+ // = %d\n", bytes_size);
27665+ ptr_func_glSecondaryColorPointer(size, type, stride,
27666+ process->current_state->
27667+ secondaryColorPointer);
27668+
27669+ break;
27670+ }
27671+
27672+ case glPushClientAttrib_func:
27673+ {
27674+ int mask = args[0];
27675+
27676+ if (process->current_state->clientStateSp <
27677+ MAX_CLIENT_STATE_STACK_SIZE) {
27678+ process->current_state->clientStateStack[process->
27679+ current_state->
27680+ clientStateSp].mask =
27681+ mask;
27682+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27683+ process->current_state->clientStateStack[process->
27684+ current_state->
27685+ clientStateSp].
27686+ activeTextureIndex =
27687+ process->current_state->activeTextureIndex;
27688+ }
27689+ process->current_state->clientStateSp++;
27690+ }
27691+ glPushClientAttrib(mask);
27692+ break;
27693+ }
27694+
27695+ case glPopClientAttrib_func:
27696+ {
27697+ if (process->current_state->clientStateSp > 0) {
27698+ process->current_state->clientStateSp--;
27699+ if (process->current_state->
27700+ clientStateStack[process->current_state->clientStateSp].
27701+ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27702+ process->current_state->activeTextureIndex =
27703+ process->current_state->clientStateStack[process->
27704+ current_state->
27705+ clientStateSp].
27706+ activeTextureIndex;
27707+ }
27708+ }
27709+ glPopClientAttrib();
27710+ break;
27711+ }
27712+
27713+ case glClientActiveTexture_func:
27714+ case glClientActiveTextureARB_func:
27715+ {
27716+ int activeTexture = args[0];
27717+
27718+ process->current_state->activeTextureIndex =
27719+ activeTexture - GL_TEXTURE0_ARB;
27720+ do_glClientActiveTextureARB(activeTexture);
27721+ break;
27722+ }
27723+
27724+ case glTexCoordPointer_fake_func:
27725+ {
27726+ int offset = args[0];
27727+ int index = args[1];
27728+ int size = args[2];
27729+ int type = args[3];
27730+ int stride = args[4];
27731+ int bytes_size = args[5];
27732+
27733+ process->current_state->texCoordPointerSize[index] =
27734+ MAX(process->current_state->texCoordPointerSize[index],
27735+ offset + bytes_size);
27736+ process->current_state->texCoordPointer[index] =
27737+ realloc(process->current_state->texCoordPointer[index],
27738+ process->current_state->texCoordPointerSize[index]);
27739+ memcpy(process->current_state->texCoordPointer[index] + offset,
27740+ (void *) args[6], bytes_size);
27741+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27742+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27743+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27744+ glTexCoordPointer(size, type, stride,
27745+ process->current_state->texCoordPointer[index]);
27746+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27747+ process->current_state->
27748+ activeTextureIndex);
27749+ break;
27750+ }
27751+
27752+ case glWeightPointerARB_fake_func:
27753+ {
27754+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27755+ int offset = args[0];
27756+ int size = args[1];
27757+ int type = args[2];
27758+ int stride = args[3];
27759+ int bytes_size = args[4];
27760+
27761+ process->current_state->weightPointerSize =
27762+ MAX(process->current_state->weightPointerSize,
27763+ offset + bytes_size);
27764+ process->current_state->weightPointer =
27765+ realloc(process->current_state->weightPointer,
27766+ process->current_state->weightPointerSize);
27767+ memcpy(process->current_state->weightPointer + offset,
27768+ (void *) args[5], bytes_size);
27769+ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
27770+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27771+ * bytes_size); */
27772+ ptr_func_glWeightPointerARB(size, type, stride,
27773+ process->current_state->
27774+ weightPointer);
27775+ break;
27776+ }
27777+
27778+ case glMatrixIndexPointerARB_fake_func:
27779+ {
27780+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27781+ (int, int, int, void *));
27782+ int offset = args[0];
27783+ int size = args[1];
27784+ int type = args[2];
27785+ int stride = args[3];
27786+ int bytes_size = args[4];
27787+
27788+ process->current_state->matrixIndexPointerSize =
27789+ MAX(process->current_state->matrixIndexPointerSize,
27790+ offset + bytes_size);
27791+ process->current_state->matrixIndexPointer =
27792+ realloc(process->current_state->matrixIndexPointer,
27793+ process->current_state->matrixIndexPointerSize);
27794+ memcpy(process->current_state->matrixIndexPointer + offset,
27795+ (void *) args[5], bytes_size);
27796+ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
27797+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27798+ * bytes_size); */
27799+ ptr_func_glMatrixIndexPointerARB(size, type, stride,
27800+ process->current_state->
27801+ matrixIndexPointer);
27802+ break;
27803+ }
27804+
27805+ case glFogCoordPointer_fake_func:
27806+ {
27807+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27808+ int offset = args[0];
27809+ int type = args[1];
27810+ int stride = args[2];
27811+ int bytes_size = args[3];
27812+
27813+ process->current_state->fogCoordPointerSize =
27814+ MAX(process->current_state->fogCoordPointerSize,
27815+ offset + bytes_size);
27816+ process->current_state->fogCoordPointer =
27817+ realloc(process->current_state->fogCoordPointer,
27818+ process->current_state->fogCoordPointerSize);
27819+ memcpy(process->current_state->fogCoordPointer + offset,
27820+ (void *) args[4], bytes_size);
27821+ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
27822+ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
27823+ ptr_func_glFogCoordPointer(type, stride,
27824+ process->current_state->
27825+ fogCoordPointer);
27826+ break;
27827+ }
27828+
27829+ case glVariantPointerEXT_fake_func:
27830+ {
27831+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27832+ int offset = args[0];
27833+ int id = args[1];
27834+ int type = args[2];
27835+ int stride = args[3];
27836+ int bytes_size = args[4];
27837+
27838+ process->current_state->variantPointerEXTSize[id] =
27839+ MAX(process->current_state->variantPointerEXTSize[id],
27840+ offset + bytes_size);
27841+ process->current_state->variantPointerEXT[id] =
27842+ realloc(process->current_state->variantPointerEXT[id],
27843+ process->current_state->variantPointerEXTSize[id]);
27844+ memcpy(process->current_state->variantPointerEXT[id] + offset,
27845+ (void *) args[5], bytes_size);
27846+ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
27847+ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
27848+ ptr_func_glVariantPointerEXT(id, type, stride,
27849+ process->current_state->
27850+ variantPointerEXT[id]);
27851+ break;
27852+ }
27853+
27854+ case glInterleavedArrays_fake_func:
27855+ {
27856+ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
27857+ int offset = args[0];
27858+ int format = args[1];
27859+ int stride = args[2];
27860+ int bytes_size = args[3];
27861+
27862+ process->current_state->interleavedArraysSize =
27863+ MAX(process->current_state->interleavedArraysSize,
27864+ offset + bytes_size);
27865+ process->current_state->interleavedArrays =
27866+ realloc(process->current_state->interleavedArrays,
27867+ process->current_state->interleavedArraysSize);
27868+ memcpy(process->current_state->interleavedArrays + offset,
27869+ (void *) args[4], bytes_size);
27870+ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
27871+ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
27872+ ptr_func_glInterleavedArrays(format, stride,
27873+ process->current_state->
27874+ interleavedArrays);
27875+ break;
27876+ }
27877+
27878+ case glElementPointerATI_fake_func:
27879+ {
27880+ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
27881+ int type = args[0];
27882+ int bytes_size = args[1];
27883+
27884+ process->current_state->elementPointerATISize = bytes_size;
27885+ process->current_state->elementPointerATI =
27886+ realloc(process->current_state->elementPointerATI,
27887+ process->current_state->elementPointerATISize);
27888+ memcpy(process->current_state->elementPointerATI,
27889+ (void *) args[2], bytes_size);
27890+ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
27891+ // byte_size=%d\n", type, bytes_size);
27892+ ptr_func_glElementPointerATI(type,
27893+ process->current_state->
27894+ elementPointerATI);
27895+ break;
27896+ }
27897+
27898+ case glTexCoordPointer01_fake_func:
27899+ {
27900+ int size = args[0];
27901+ int type = args[1];
27902+ int stride = args[2];
27903+ int bytes_size = args[3];
27904+
27905+ process->current_state->texCoordPointerSize[0] = bytes_size;
27906+ process->current_state->texCoordPointer[0] =
27907+ realloc(process->current_state->texCoordPointer[0],
27908+ bytes_size);
27909+ memcpy(process->current_state->texCoordPointer[0],
27910+ (void *) args[4], bytes_size);
27911+ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
27912+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27913+ * bytes_size); */
27914+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27915+ glTexCoordPointer(size, type, stride,
27916+ process->current_state->texCoordPointer[0]);
27917+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27918+ glTexCoordPointer(size, type, stride,
27919+ process->current_state->texCoordPointer[0]);
27920+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27921+ process->current_state->
27922+ activeTextureIndex);
27923+ break;
27924+ }
27925+
27926+ case glTexCoordPointer012_fake_func:
27927+ {
27928+ int size = args[0];
27929+ int type = args[1];
27930+ int stride = args[2];
27931+ int bytes_size = args[3];
27932+
27933+ process->current_state->texCoordPointerSize[0] = bytes_size;
27934+ process->current_state->texCoordPointer[0] =
27935+ realloc(process->current_state->texCoordPointer[0],
27936+ bytes_size);
27937+ memcpy(process->current_state->texCoordPointer[0],
27938+ (void *) args[4], bytes_size);
27939+ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
27940+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27941+ * bytes_size); */
27942+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27943+ glTexCoordPointer(size, type, stride,
27944+ process->current_state->texCoordPointer[0]);
27945+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27946+ glTexCoordPointer(size, type, stride,
27947+ process->current_state->texCoordPointer[0]);
27948+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27949+ glTexCoordPointer(size, type, stride,
27950+ process->current_state->texCoordPointer[0]);
27951+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27952+ process->current_state->
27953+ activeTextureIndex);
27954+ break;
27955+ }
27956+
27957+ case glVertexAndNormalPointer_fake_func:
27958+ {
27959+ int vertexPointerSize = args[0];
27960+ int vertexPointerType = args[1];
27961+ int vertexPointerStride = args[2];
27962+ int normalPointerType = args[3];
27963+ int normalPointerStride = args[4];
27964+ int bytes_size = args[5];
27965+ void *ptr = (void *) args[6];
27966+
27967+ process->current_state->vertexPointerSize = bytes_size;
27968+ process->current_state->vertexPointer =
27969+ realloc(process->current_state->vertexPointer, bytes_size);
27970+ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
27971+ glVertexPointer(vertexPointerSize, vertexPointerType,
27972+ vertexPointerStride,
27973+ process->current_state->vertexPointer);
27974+ glNormalPointer(normalPointerType, normalPointerStride,
27975+ process->current_state->vertexPointer);
27976+ break;
27977+ }
27978+
27979+ case glVertexNormalPointerInterlaced_fake_func:
27980+ {
27981+ int i = 0;
27982+ int offset = args[i++];
27983+ int vertexPointerSize = args[i++];
27984+ int vertexPointerType = args[i++];
27985+ int stride = args[i++];
27986+ int normalPointerOffset = args[i++];
27987+ int normalPointerType = args[i++];
27988+ int bytes_size = args[i++];
27989+ void *ptr = (void *) args[i++];
27990+
27991+ process->current_state->vertexPointerSize =
27992+ MAX(process->current_state->vertexPointerSize,
27993+ offset + bytes_size);
27994+ process->current_state->vertexPointer =
27995+ realloc(process->current_state->vertexPointer,
27996+ process->current_state->vertexPointerSize);
27997+ memcpy(process->current_state->vertexPointer + offset, ptr,
27998+ bytes_size);
27999+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28000+ process->current_state->vertexPointer);
28001+ glNormalPointer(normalPointerType, stride,
28002+ process->current_state->vertexPointer +
28003+ normalPointerOffset);
28004+ break;
28005+ }
28006+
28007+ case glTuxRacerDrawElements_fake_func:
28008+ {
28009+ int mode = args[0];
28010+ int count = args[1];
28011+ int isColorEnabled = args[2];
28012+ void *ptr = (void *) args[3];
28013+ int stride =
28014+ 6 * sizeof(float) +
28015+ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
28016+ glVertexPointer(3, GL_FLOAT, stride, ptr);
28017+ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
28018+ if (isColorEnabled)
28019+ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
28020+ ptr + 6 * sizeof(float));
28021+ glDrawArrays(mode, 0, count);
28022+ break;
28023+ }
28024+
28025+ case glVertexNormalColorPointerInterlaced_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 colorPointerOffset = args[i++];
28035+ int colorPointerSize = args[i++];
28036+ int colorPointerType = 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+ glColorPointer(colorPointerSize, colorPointerType, stride,
28054+ process->current_state->vertexPointer +
28055+ colorPointerOffset);
28056+ break;
28057+ }
28058+
28059+ case glVertexColorTexCoord0PointerInterlaced_fake_func:
28060+ {
28061+ int i = 0;
28062+ int offset = args[i++];
28063+ int vertexPointerSize = args[i++];
28064+ int vertexPointerType = args[i++];
28065+ int stride = args[i++];
28066+ int colorPointerOffset = args[i++];
28067+ int colorPointerSize = args[i++];
28068+ int colorPointerType = args[i++];
28069+ int texCoord0PointerOffset = args[i++];
28070+ int texCoord0PointerSize = args[i++];
28071+ int texCoord0PointerType = args[i++];
28072+ int bytes_size = args[i++];
28073+ void *ptr = (void *) args[i++];
28074+
28075+ process->current_state->vertexPointerSize =
28076+ MAX(process->current_state->vertexPointerSize,
28077+ offset + bytes_size);
28078+ process->current_state->vertexPointer =
28079+ realloc(process->current_state->vertexPointer,
28080+ process->current_state->vertexPointerSize);
28081+ memcpy(process->current_state->vertexPointer + offset, ptr,
28082+ bytes_size);
28083+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28084+ process->current_state->vertexPointer);
28085+ glColorPointer(colorPointerSize, colorPointerType, stride,
28086+ process->current_state->vertexPointer +
28087+ colorPointerOffset);
28088+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28089+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28090+ stride,
28091+ process->current_state->vertexPointer +
28092+ texCoord0PointerOffset);
28093+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28094+ process->current_state->
28095+ activeTextureIndex);
28096+ break;
28097+ }
28098+
28099+ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
28100+ {
28101+ int i = 0;
28102+ int offset = args[i++];
28103+ int vertexPointerSize = args[i++];
28104+ int vertexPointerType = args[i++];
28105+ int stride = args[i++];
28106+ int normalPointerOffset = args[i++];
28107+ int normalPointerType = args[i++];
28108+ int texCoord0PointerOffset = args[i++];
28109+ int texCoord0PointerSize = args[i++];
28110+ int texCoord0PointerType = args[i++];
28111+ int bytes_size = args[i++];
28112+ void *ptr = (void *) args[i++];
28113+
28114+ process->current_state->vertexPointerSize =
28115+ MAX(process->current_state->vertexPointerSize,
28116+ offset + bytes_size);
28117+ process->current_state->vertexPointer =
28118+ realloc(process->current_state->vertexPointer,
28119+ process->current_state->vertexPointerSize);
28120+ memcpy(process->current_state->vertexPointer + offset, ptr,
28121+ bytes_size);
28122+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28123+ process->current_state->vertexPointer);
28124+ glNormalPointer(normalPointerType, stride,
28125+ process->current_state->vertexPointer +
28126+ normalPointerOffset);
28127+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28128+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28129+ stride,
28130+ process->current_state->vertexPointer +
28131+ texCoord0PointerOffset);
28132+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28133+ process->current_state->
28134+ activeTextureIndex);
28135+ break;
28136+ }
28137+
28138+ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
28139+ {
28140+ int i = 0;
28141+ int offset = args[i++];
28142+ int vertexPointerSize = args[i++];
28143+ int vertexPointerType = args[i++];
28144+ int stride = args[i++];
28145+ int normalPointerOffset = args[i++];
28146+ int normalPointerType = args[i++];
28147+ int texCoord0PointerOffset = args[i++];
28148+ int texCoord0PointerSize = args[i++];
28149+ int texCoord0PointerType = args[i++];
28150+ int texCoord1PointerOffset = args[i++];
28151+ int texCoord1PointerSize = args[i++];
28152+ int texCoord1PointerType = args[i++];
28153+ int bytes_size = args[i++];
28154+ void *ptr = (void *) args[i++];
28155+
28156+ process->current_state->vertexPointerSize =
28157+ MAX(process->current_state->vertexPointerSize,
28158+ offset + bytes_size);
28159+ process->current_state->vertexPointer =
28160+ realloc(process->current_state->vertexPointer,
28161+ process->current_state->vertexPointerSize);
28162+ memcpy(process->current_state->vertexPointer + offset, ptr,
28163+ bytes_size);
28164+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28165+ process->current_state->vertexPointer);
28166+ glNormalPointer(normalPointerType, stride,
28167+ process->current_state->vertexPointer +
28168+ normalPointerOffset);
28169+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28170+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28171+ stride,
28172+ process->current_state->vertexPointer +
28173+ texCoord0PointerOffset);
28174+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28175+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28176+ stride,
28177+ process->current_state->vertexPointer +
28178+ texCoord1PointerOffset);
28179+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28180+ process->current_state->
28181+ activeTextureIndex);
28182+ break;
28183+ }
28184+
28185+ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
28186+ {
28187+ int i = 0;
28188+ int offset = args[i++];
28189+ int vertexPointerSize = args[i++];
28190+ int vertexPointerType = args[i++];
28191+ int stride = args[i++];
28192+ int normalPointerOffset = args[i++];
28193+ int normalPointerType = args[i++];
28194+ int texCoord0PointerOffset = args[i++];
28195+ int texCoord0PointerSize = args[i++];
28196+ int texCoord0PointerType = args[i++];
28197+ int texCoord1PointerOffset = args[i++];
28198+ int texCoord1PointerSize = args[i++];
28199+ int texCoord1PointerType = args[i++];
28200+ int texCoord2PointerOffset = args[i++];
28201+ int texCoord2PointerSize = args[i++];
28202+ int texCoord2PointerType = args[i++];
28203+ int bytes_size = args[i++];
28204+ void *ptr = (void *) args[i++];
28205+
28206+ process->current_state->vertexPointerSize =
28207+ MAX(process->current_state->vertexPointerSize,
28208+ offset + bytes_size);
28209+ process->current_state->vertexPointer =
28210+ realloc(process->current_state->vertexPointer,
28211+ process->current_state->vertexPointerSize);
28212+ memcpy(process->current_state->vertexPointer + offset, ptr,
28213+ bytes_size);
28214+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28215+ process->current_state->vertexPointer);
28216+ glNormalPointer(normalPointerType, stride,
28217+ process->current_state->vertexPointer +
28218+ normalPointerOffset);
28219+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28220+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28221+ stride,
28222+ process->current_state->vertexPointer +
28223+ texCoord0PointerOffset);
28224+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28225+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28226+ stride,
28227+ process->current_state->vertexPointer +
28228+ texCoord1PointerOffset);
28229+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28230+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28231+ stride,
28232+ process->current_state->vertexPointer +
28233+ texCoord2PointerOffset);
28234+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28235+ process->current_state->
28236+ activeTextureIndex);
28237+ break;
28238+ }
28239+
28240+ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
28241+ {
28242+ int i = 0;
28243+ int offset = args[i++];
28244+ int vertexPointerSize = args[i++];
28245+ int vertexPointerType = args[i++];
28246+ int stride = args[i++];
28247+ int normalPointerOffset = args[i++];
28248+ int normalPointerType = args[i++];
28249+ int colorPointerOffset = args[i++];
28250+ int colorPointerSize = args[i++];
28251+ int colorPointerType = args[i++];
28252+ int texCoord0PointerOffset = args[i++];
28253+ int texCoord0PointerSize = args[i++];
28254+ int texCoord0PointerType = args[i++];
28255+ int bytes_size = args[i++];
28256+ void *ptr = (void *) args[i++];
28257+
28258+ process->current_state->vertexPointerSize =
28259+ MAX(process->current_state->vertexPointerSize,
28260+ offset + bytes_size);
28261+ process->current_state->vertexPointer =
28262+ realloc(process->current_state->vertexPointer,
28263+ process->current_state->vertexPointerSize);
28264+ memcpy(process->current_state->vertexPointer + offset, ptr,
28265+ bytes_size);
28266+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28267+ process->current_state->vertexPointer);
28268+ glNormalPointer(normalPointerType, stride,
28269+ process->current_state->vertexPointer +
28270+ normalPointerOffset);
28271+ glColorPointer(colorPointerSize, colorPointerType, stride,
28272+ process->current_state->vertexPointer +
28273+ colorPointerOffset);
28274+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28275+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28276+ stride,
28277+ process->current_state->vertexPointer +
28278+ texCoord0PointerOffset);
28279+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28280+ process->current_state->
28281+ activeTextureIndex);
28282+ break;
28283+ }
28284+
28285+ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
28286+ {
28287+ int i = 0;
28288+ int offset = args[i++];
28289+ int vertexPointerSize = args[i++];
28290+ int vertexPointerType = args[i++];
28291+ int stride = args[i++];
28292+ int normalPointerOffset = args[i++];
28293+ int normalPointerType = args[i++];
28294+ int colorPointerOffset = args[i++];
28295+ int colorPointerSize = args[i++];
28296+ int colorPointerType = args[i++];
28297+ int texCoord0PointerOffset = args[i++];
28298+ int texCoord0PointerSize = args[i++];
28299+ int texCoord0PointerType = args[i++];
28300+ int texCoord1PointerOffset = args[i++];
28301+ int texCoord1PointerSize = args[i++];
28302+ int texCoord1PointerType = args[i++];
28303+ int bytes_size = args[i++];
28304+ void *ptr = (void *) args[i++];
28305+
28306+ process->current_state->vertexPointerSize =
28307+ MAX(process->current_state->vertexPointerSize,
28308+ offset + bytes_size);
28309+ process->current_state->vertexPointer =
28310+ realloc(process->current_state->vertexPointer,
28311+ process->current_state->vertexPointerSize);
28312+ memcpy(process->current_state->vertexPointer + offset, ptr,
28313+ bytes_size);
28314+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28315+ process->current_state->vertexPointer);
28316+ glNormalPointer(normalPointerType, stride,
28317+ process->current_state->vertexPointer +
28318+ normalPointerOffset);
28319+ glColorPointer(colorPointerSize, colorPointerType, stride,
28320+ process->current_state->vertexPointer +
28321+ colorPointerOffset);
28322+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28323+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28324+ stride,
28325+ process->current_state->vertexPointer +
28326+ texCoord0PointerOffset);
28327+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28328+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28329+ stride,
28330+ process->current_state->vertexPointer +
28331+ texCoord1PointerOffset);
28332+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28333+ process->current_state->
28334+ activeTextureIndex);
28335+ break;
28336+ }
28337+
28338+ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
28339+ {
28340+ int i = 0;
28341+ int offset = args[i++];
28342+ int vertexPointerSize = args[i++];
28343+ int vertexPointerType = args[i++];
28344+ int stride = args[i++];
28345+ int normalPointerOffset = args[i++];
28346+ int normalPointerType = args[i++];
28347+ int colorPointerOffset = args[i++];
28348+ int colorPointerSize = args[i++];
28349+ int colorPointerType = args[i++];
28350+ int texCoord0PointerOffset = args[i++];
28351+ int texCoord0PointerSize = args[i++];
28352+ int texCoord0PointerType = args[i++];
28353+ int texCoord1PointerOffset = args[i++];
28354+ int texCoord1PointerSize = args[i++];
28355+ int texCoord1PointerType = args[i++];
28356+ int texCoord2PointerOffset = args[i++];
28357+ int texCoord2PointerSize = args[i++];
28358+ int texCoord2PointerType = args[i++];
28359+ int bytes_size = args[i++];
28360+ void *ptr = (void *) args[i++];
28361+
28362+ process->current_state->vertexPointerSize =
28363+ MAX(process->current_state->vertexPointerSize,
28364+ offset + bytes_size);
28365+ process->current_state->vertexPointer =
28366+ realloc(process->current_state->vertexPointer,
28367+ process->current_state->vertexPointerSize);
28368+ memcpy(process->current_state->vertexPointer + offset, ptr,
28369+ bytes_size);
28370+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28371+ process->current_state->vertexPointer);
28372+ glNormalPointer(normalPointerType, stride,
28373+ process->current_state->vertexPointer +
28374+ normalPointerOffset);
28375+ glColorPointer(colorPointerSize, colorPointerType, stride,
28376+ process->current_state->vertexPointer +
28377+ colorPointerOffset);
28378+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28379+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28380+ stride,
28381+ process->current_state->vertexPointer +
28382+ texCoord0PointerOffset);
28383+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28384+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28385+ stride,
28386+ process->current_state->vertexPointer +
28387+ texCoord1PointerOffset);
28388+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28389+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28390+ stride,
28391+ process->current_state->vertexPointer +
28392+ texCoord2PointerOffset);
28393+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28394+ process->current_state->
28395+ activeTextureIndex);
28396+ break;
28397+ }
28398+
28399+ case _glVertexPointer_buffer_func:
28400+ {
28401+ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
28402+ break;
28403+ }
28404+
28405+ case _glNormalPointer_buffer_func:
28406+ {
28407+ glNormalPointer(args[0], args[1], (void *) args[2]);
28408+ break;
28409+ }
28410+
28411+ case _glColorPointer_buffer_func:
28412+ {
28413+ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
28414+ break;
28415+ }
28416+
28417+ case _glSecondaryColorPointer_buffer_func:
28418+ {
28419+ GET_EXT_PTR(void, glSecondaryColorPointer,
28420+ (int, int, int, void *));
28421+ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
28422+ (void *) args[3]);
28423+ break;
28424+ }
28425+
28426+ case _glIndexPointer_buffer_func:
28427+ {
28428+ glIndexPointer(args[0], args[1], (void *) args[2]);
28429+ break;
28430+ }
28431+
28432+ case _glTexCoordPointer_buffer_func:
28433+ {
28434+ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
28435+ break;
28436+ }
28437+
28438+ case _glEdgeFlagPointer_buffer_func:
28439+ {
28440+ glEdgeFlagPointer(args[0], (void *) args[1]);
28441+ break;
28442+ }
28443+
28444+ case _glVertexAttribPointerARB_buffer_func:
28445+ {
28446+ GET_EXT_PTR(void, glVertexAttribPointerARB,
28447+ (int, int, int, int, int, void *));
28448+ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
28449+ args[3], args[4],
28450+ (void *) args[5]);
28451+ break;
28452+ }
28453+
28454+ case _glWeightPointerARB_buffer_func:
28455+ {
28456+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
28457+
28458+ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
28459+ (void *) args[3]);
28460+ break;
28461+ }
28462+
28463+ case _glMatrixIndexPointerARB_buffer_func:
28464+ {
28465+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
28466+ (int, int, int, void *));
28467+ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
28468+ (void *) args[3]);
28469+ break;
28470+ }
28471+
28472+ case _glFogCoordPointer_buffer_func:
28473+ {
28474+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
28475+
28476+ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
28477+ break;
28478+ }
28479+
28480+ case _glVariantPointerEXT_buffer_func:
28481+ {
28482+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
28483+
28484+ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
28485+ (void *) args[3]);
28486+ break;
28487+ }
28488+
28489+ case _glDrawElements_buffer_func:
28490+ {
28491+ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
28492+ break;
28493+ }
28494+
28495+ case _glDrawRangeElements_buffer_func:
28496+ {
28497+ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
28498+ (void *) args[5]);
28499+ break;
28500+ }
28501+
28502+ case _glMultiDrawElements_buffer_func:
28503+ {
28504+ GET_EXT_PTR(void, glMultiDrawElements,
28505+ (int, int *, int, void **, int));
28506+ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
28507+ (void **) args[3], args[4]);
28508+ break;
28509+ }
28510+
28511+ case _glGetError_fake_func:
28512+ {
28513+ break;
28514+ }
28515+
28516+ case glGetIntegerv_func:
28517+ {
28518+ glGetIntegerv(args[0], (int *) args[1]);
28519+ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
28520+ *(int *) args[1]);
28521+ break;
28522+ }
28523+
28524+ case _glReadPixels_pbo_func:
28525+ {
28526+ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28527+ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
28528+ ARG_TO_UNSIGNED_INT(args[4]),
28529+ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
28530+ break;
28531+ }
28532+
28533+ case _glDrawPixels_pbo_func:
28534+ {
28535+ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28536+ ARG_TO_UNSIGNED_INT(args[2]),
28537+ ARG_TO_UNSIGNED_INT(args[3]),
28538+ (const void *) (args[4]));
28539+ break;
28540+ }
28541+
28542+ case _glMapBufferARB_fake_func:
28543+ {
28544+ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
28545+ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
28546+ int target = args[0];
28547+ int size = args[1];
28548+ void *dst_ptr = (void *) args[2];
28549+ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
28550+
28551+ if (src_ptr) {
28552+ memcpy(dst_ptr, src_ptr, size);
28553+ ret_int = ptr_func_glUnmapBufferARB(target);
28554+ } else {
28555+ ret_int = 0;
28556+ }
28557+ break;
28558+ }
28559+
28560+ case fake_gluBuild2DMipmaps_func:
28561+ {
28562+ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
28563+ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
28564+ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
28565+ const GLvoid *arg_6));
28566+ if (ptr_func_gluBuild2DMipmaps == NULL)
28567+ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
28568+ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
28569+ ARG_TO_INT(args[1]),
28570+ ARG_TO_INT(args[2]),
28571+ ARG_TO_INT(args[3]),
28572+ ARG_TO_UNSIGNED_INT(args[4]),
28573+ ARG_TO_UNSIGNED_INT(args[5]),
28574+ (const void *) (args[6]));
28575+ break;
28576+ }
28577+
28578+ case _glSelectBuffer_fake_func:
28579+ {
28580+ process->current_state->selectBufferSize = args[0] * 4;
28581+ process->current_state->selectBufferPtr =
28582+ realloc(process->current_state->selectBufferPtr,
28583+ process->current_state->selectBufferSize);
28584+ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
28585+ break;
28586+ }
28587+
28588+ case _glGetSelectBuffer_fake_func:
28589+ {
28590+ void *ptr = (void *) args[0];
28591+
28592+ memcpy(ptr, process->current_state->selectBufferPtr,
28593+ process->current_state->selectBufferSize);
28594+ break;
28595+ }
28596+
28597+ case _glFeedbackBuffer_fake_func:
28598+ {
28599+ process->current_state->feedbackBufferSize = args[0] * 4;
28600+ process->current_state->feedbackBufferPtr =
28601+ realloc(process->current_state->feedbackBufferPtr,
28602+ process->current_state->feedbackBufferSize);
28603+ glFeedbackBuffer(args[0], args[1],
28604+ process->current_state->feedbackBufferPtr);
28605+ break;
28606+ }
28607+
28608+ case _glGetFeedbackBuffer_fake_func:
28609+ {
28610+ void *ptr = (void *) args[0];
28611+
28612+ memcpy(ptr, process->current_state->feedbackBufferPtr,
28613+ process->current_state->feedbackBufferSize);
28614+ break;
28615+ }
28616+
28617+ /*
28618+ * case glEnableClientState_func: { if (display_function_call)
28619+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28620+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28621+ *
28622+ * case glDisableClientState_func: { if (display_function_call)
28623+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28624+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28625+ *
28626+ * case glClientActiveTexture_func: case
28627+ * glClientActiveTextureARB_func: { if (display_function_call)
28628+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28629+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28630+ *
28631+ * case glActiveTextureARB_func: { if (display_function_call)
28632+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28633+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28634+ *
28635+ * case glLockArraysEXT_func: break;
28636+ *
28637+ * case glUnlockArraysEXT_func: break;
28638+ *
28639+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28640+ *
28641+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28642+ * break; }
28643+ *
28644+ * case glDrawElements_func: {
28645+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28646+ *
28647+ * case glDrawRangeElements_func: {
28648+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28649+ * break; } */
28650+
28651+ case glGetError_func:
28652+ {
28653+#ifdef SYSTEMATIC_ERROR_CHECK
28654+ ret_int = process->current_state->last_error;
28655+#else
28656+ ret_int = glGetError();
28657+#endif
28658+ break;
28659+ }
28660+
28661+ case glNewObjectBufferATI_func:
28662+ {
28663+ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
28664+
28665+ ret_int = ptr_func_glNewObjectBufferATI(args[0],
28666+ (void *) args[1], args[2]);
28667+ break;
28668+ }
28669+
28670+ case glClear_func:
28671+ /* HACK workaround for an unexplainable issue */
28672+ if (args[0] & GL_COLOR_BUFFER_BIT)
28673+ glClear(GL_COLOR_BUFFER_BIT);
28674+ if (args[0] & GL_STENCIL_BUFFER_BIT)
28675+ glClear(GL_STENCIL_BUFFER_BIT);
28676+ if (args[0] & GL_DEPTH_BUFFER_BIT)
28677+ glClear(GL_DEPTH_BUFFER_BIT);
28678+ if (args[0] & GL_ACCUM_BUFFER_BIT)
28679+ glClear(GL_ACCUM_BUFFER_BIT);
28680+ break;
28681+
28682+ default:
28683+ execute_func(func_number, args, &ret_int, &ret_char);
28684+ break;
28685+ }
28686+
28687+#ifdef SYSTEMATIC_ERROR_CHECK
28688+ if (func_number == glGetError_func) {
28689+ process->current_state->last_error = 0;
28690+ } else {
28691+ process->current_state->last_error = glGetError();
28692+ if (process->current_state->last_error != 0) {
28693+ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
28694+ process->current_state->last_error);
28695+ }
28696+ }
28697+#endif
28698+
28699+ switch (ret_type) {
28700+ case TYPE_NONE:
28701+ break;
28702+
28703+ case TYPE_CHAR:
28704+ case TYPE_UNSIGNED_CHAR:
28705+ ret_int = ret_char;
28706+ break;
28707+
28708+ case TYPE_INT:
28709+ case TYPE_UNSIGNED_INT:
28710+ break;
28711+
28712+ case TYPE_CONST_CHAR:
28713+ {
28714+ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
28715+ break;
28716+ }
28717+
28718+ default:
28719+ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
28720+ exit(-1);
28721+ break;
28722+ }
28723+
28724+ if (display_function_call)
28725+ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
28726+ tab_opengl_calls_name[func_number]);
28727+
28728+ return ret_int;
28729+}
28730diff --git a/target-i386/opengl_func.h b/target-i386/opengl_func.h
28731new file mode 100644
28732index 0000000..d1b50fd
28733--- /dev/null
28734+++ b/target-i386/opengl_func.h
28735@@ -0,0 +1,1108 @@
28736+/*
28737+ * Main header for both host and guest sides
28738+ *
28739+ * Copyright (c) 2006,2007 Even Rouault
28740+ *
28741+ * Permission is hereby granted, free of charge, to any person obtaining a copy
28742+ * of this software and associated documentation files (the "Software"), to deal
28743+ * in the Software without restriction, including without limitation the rights
28744+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28745+ * copies of the Software, and to permit persons to whom the Software is
28746+ * furnished to do so, subject to the following conditions:
28747+ *
28748+ * The above copyright notice and this permission notice shall be included in
28749+ * all copies or substantial portions of the Software.
28750+ *
28751+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28752+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28753+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28754+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28755+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28756+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28757+ * THE SOFTWARE.
28758+ */
28759+
28760+#include "mesa_gl.h"
28761+#include "mesa_glext.h"
28762+
28763+/* Argument list are internally of a type that can hold a target pointer
28764+ * or a host pointer. */
28765+typedef target_phys_addr_t arg_t;
28766+
28767+enum {
28768+ TYPE_NONE,
28769+ TYPE_CHAR,
28770+ TYPE_UNSIGNED_CHAR,
28771+ TYPE_SHORT,
28772+ TYPE_UNSIGNED_SHORT,
28773+ TYPE_INT,
28774+ TYPE_UNSIGNED_INT,
28775+ TYPE_FLOAT,
28776+ TYPE_DOUBLE,
28777+ TYPE_1CHAR,
28778+ TYPE_2CHAR,
28779+ TYPE_3CHAR,
28780+ TYPE_4CHAR,
28781+ TYPE_128UCHAR,
28782+ TYPE_1SHORT,
28783+ TYPE_2SHORT,
28784+ TYPE_3SHORT,
28785+ TYPE_4SHORT,
28786+ TYPE_1INT,
28787+ TYPE_2INT,
28788+ TYPE_3INT,
28789+ TYPE_4INT,
28790+ TYPE_1FLOAT,
28791+ TYPE_2FLOAT,
28792+ TYPE_3FLOAT,
28793+ TYPE_4FLOAT,
28794+ TYPE_16FLOAT,
28795+ TYPE_1DOUBLE,
28796+ TYPE_2DOUBLE,
28797+ TYPE_3DOUBLE,
28798+ TYPE_4DOUBLE,
28799+ TYPE_16DOUBLE,
28800+ TYPE_OUT_1INT,
28801+ TYPE_OUT_1FLOAT,
28802+ TYPE_OUT_4CHAR,
28803+ TYPE_OUT_4INT,
28804+ TYPE_OUT_4FLOAT,
28805+ TYPE_OUT_4DOUBLE,
28806+ TYPE_OUT_128UCHAR,
28807+ TYPE_CONST_CHAR,
28808+ TYPE_ARRAY_CHAR,
28809+ TYPE_ARRAY_SHORT,
28810+ TYPE_ARRAY_INT,
28811+ TYPE_ARRAY_FLOAT,
28812+ TYPE_ARRAY_DOUBLE,
28813+ TYPE_IN_IGNORED_POINTER,
28814+ TYPE_OUT_ARRAY_CHAR,
28815+ TYPE_OUT_ARRAY_SHORT,
28816+ TYPE_OUT_ARRAY_INT,
28817+ TYPE_OUT_ARRAY_FLOAT,
28818+ TYPE_OUT_ARRAY_DOUBLE,
28819+ TYPE_NULL_TERMINATED_STRING,
28820+
28821+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28822+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28823+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28824+ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28825+ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28826+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28827+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28828+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28829+ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28830+ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28831+ /* .... */
28832+ TYPE_LAST,
28833+ /* .... */
28834+ TYPE_1UCHAR = TYPE_CHAR,
28835+ TYPE_1USHORT = TYPE_1SHORT,
28836+ TYPE_1UINT = TYPE_1INT,
28837+ TYPE_OUT_1UINT = TYPE_OUT_1INT,
28838+ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
28839+ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
28840+ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
28841+ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
28842+ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
28843+ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
28844+ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
28845+ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28846+ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28847+ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
28848+ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
28849+ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28850+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28851+ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28852+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28853+ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28854+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28855+ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28856+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28857+ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28858+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28859+ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28860+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28861+ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28862+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28863+ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28864+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28865+ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28866+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28867+ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28868+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28869+};
28870+
28871+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28872+ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28873+ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28874+ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28875+ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28876+ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28877+
28878+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28879+ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28880+ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28881+ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28882+ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28883+ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28884+
28885+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
28886+ case TYPE_ARRAY_CHAR: \
28887+ case TYPE_ARRAY_SHORT: \
28888+ case TYPE_ARRAY_INT: \
28889+ case TYPE_ARRAY_FLOAT: \
28890+ case TYPE_ARRAY_DOUBLE
28891+
28892+#define CASE_IN_KNOWN_SIZE_POINTERS \
28893+ case TYPE_1CHAR:\
28894+ case TYPE_2CHAR:\
28895+ case TYPE_3CHAR:\
28896+ case TYPE_4CHAR:\
28897+ case TYPE_128UCHAR:\
28898+ case TYPE_1SHORT:\
28899+ case TYPE_2SHORT:\
28900+ case TYPE_3SHORT:\
28901+ case TYPE_4SHORT:\
28902+ case TYPE_1INT:\
28903+ case TYPE_2INT:\
28904+ case TYPE_3INT:\
28905+ case TYPE_4INT:\
28906+ case TYPE_1FLOAT:\
28907+ case TYPE_2FLOAT:\
28908+ case TYPE_3FLOAT:\
28909+ case TYPE_4FLOAT:\
28910+ case TYPE_16FLOAT:\
28911+ case TYPE_1DOUBLE:\
28912+ case TYPE_2DOUBLE:\
28913+ case TYPE_3DOUBLE:\
28914+ case TYPE_4DOUBLE:\
28915+ case TYPE_16DOUBLE
28916+
28917+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
28918+ case TYPE_OUT_ARRAY_CHAR: \
28919+ case TYPE_OUT_ARRAY_SHORT: \
28920+ case TYPE_OUT_ARRAY_INT: \
28921+ case TYPE_OUT_ARRAY_FLOAT: \
28922+ case TYPE_OUT_ARRAY_DOUBLE
28923+
28924+#define CASE_OUT_KNOWN_SIZE_POINTERS \
28925+ case TYPE_OUT_1INT: \
28926+ case TYPE_OUT_1FLOAT: \
28927+ case TYPE_OUT_4CHAR: \
28928+ case TYPE_OUT_4INT: \
28929+ case TYPE_OUT_4FLOAT: \
28930+ case TYPE_OUT_4DOUBLE: \
28931+ case TYPE_OUT_128UCHAR \
28932+
28933+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28934+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28935+
28936+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
28937+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
28938+
28939+
28940+#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)
28941+#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)
28942+#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)
28943+#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)
28944+#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)
28945+
28946+#define NB_MAX_TEXTURES 16
28947+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
28948+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
28949+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
28950+
28951+static int tab_args_type_length[] = {
28952+ 0,
28953+ sizeof(char),
28954+ sizeof(unsigned char),
28955+ sizeof(short),
28956+ sizeof(unsigned short),
28957+ sizeof(int),
28958+ sizeof(unsigned int),
28959+ sizeof(float),
28960+ sizeof(double),
28961+ 1 * sizeof(char),
28962+ 2 * sizeof(char),
28963+ 3 * sizeof(char),
28964+ 4 * sizeof(char),
28965+ 128 * sizeof(char),
28966+ 1 * sizeof(short),
28967+ 2 * sizeof(short),
28968+ 3 * sizeof(short),
28969+ 4 * sizeof(short),
28970+ 1 * sizeof(int),
28971+ 2 * sizeof(int),
28972+ 3 * sizeof(int),
28973+ 4 * sizeof(int),
28974+ 1 * sizeof(float),
28975+ 2 * sizeof(float),
28976+ 3 * sizeof(float),
28977+ 4 * sizeof(float),
28978+ 16 * sizeof(float),
28979+ 1 * sizeof(double),
28980+ 2 * sizeof(double),
28981+ 3 * sizeof(double),
28982+ 4 * sizeof(double),
28983+ 16 * sizeof(double),
28984+ sizeof(int),
28985+ sizeof(float),
28986+ 4 * sizeof(char),
28987+ 4 * sizeof(int),
28988+ 4 * sizeof(float),
28989+ 4 * sizeof(double),
28990+ 128 * sizeof(char),
28991+ 0,
28992+ 0,
28993+ 0,
28994+ 0,
28995+ 0,
28996+ 0,
28997+ 0,
28998+ 0,
28999+ 0,
29000+ 0,
29001+ 0,
29002+ 0,
29003+ 0,
29004+
29005+ /* the following sizes are the size of 1 element of the array */
29006+ sizeof(char),
29007+ sizeof(short),
29008+ sizeof(int),
29009+ sizeof(float),
29010+ sizeof(double),
29011+ sizeof(char),
29012+ sizeof(short),
29013+ sizeof(int),
29014+ sizeof(float),
29015+ sizeof(double),
29016+};
29017+
29018+typedef struct {
29019+ int ret_type;
29020+ int has_out_parameters;
29021+ int nb_args;
29022+ int args_type[0];
29023+} Signature;
29024+
29025+static const int _init32_signature[] =
29026+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
29027+static const int _init64_signature[] =
29028+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
29029+
29030+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
29031+
29032+static const int _serialized_calls_signature[] =
29033+ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
29034+
29035+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
29036+
29037+static const int _changeWindowState_signature[] =
29038+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29039+
29040+static const int _moveResizeWindow_signature[] =
29041+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
29042+
29043+static const int _send_cursor_signature[] =
29044+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
29045+ TYPE_INT, TYPE_INT,
29046+ TYPE_INT, TYPE_INT,
29047+ TYPE_ARRAY_INT
29048+};
29049+
29050+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
29051+static const int glXChooseVisual_signature[] =
29052+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
29053+
29054+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
29055+ GLXContext shareList, Bool direct )*/
29056+static const int glXCreateContext_signature[] =
29057+ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
29058+
29059+static const int glXCopyContext_signature[] =
29060+ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29061+TYPE_INT };
29062+
29063+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
29064+static const int glXDestroyContext_signature[] =
29065+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29066+
29067+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
29068+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
29069+/* making it asynchronous */
29070+static const int glXMakeCurrent_signature[] =
29071+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29072+
29073+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
29074+ int attrib, int *value )*/
29075+static const int glXGetConfig_signature[] =
29076+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29077+TYPE_OUT_1INT };
29078+
29079+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
29080+static const int glXGetConfig_extended_signature[] =
29081+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29082+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
29083+
29084+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
29085+static const int glXSwapBuffers_signature[] =
29086+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29087+
29088+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
29089+static const int glXQueryVersion_signature[] =
29090+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
29091+
29092+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
29093+static const int glXQueryExtension_signature[] =
29094+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
29095+
29096+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
29097+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
29098+
29099+/* GLX 1.1 and later */
29100+
29101+/* const char *glXGetClientString( Display *dpy, int name ) */
29102+static const int glXGetClientString_signature[] =
29103+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29104+
29105+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
29106+static const int glXQueryExtensionsString_signature[] =
29107+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29108+
29109+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
29110+static const int glXQueryServerString_signature[] =
29111+ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29112+
29113+
29114+static const int glXGetProcAddress_fake_signature[] =
29115+ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
29116+
29117+static const int glXGetProcAddress_global_fake_signature[] =
29118+ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
29119+
29120+
29121+/* GLX 1.3 and later */
29122+
29123+/*
29124+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
29125+ const int *attribList, int *nitems ); */
29126+static const int glXChooseFBConfig_signature[] =
29127+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
29128+TYPE_OUT_1INT };
29129+
29130+static const int glXChooseFBConfigSGIX_signature[] =
29131+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
29132+TYPE_OUT_1INT };
29133+
29134+static const int glXGetFBConfigs_signature[] =
29135+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
29136+
29137+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
29138+static const int glXGetFBConfigAttrib_extended_signature[] =
29139+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29140+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
29141+
29142+
29143+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
29144+ const int *attribList ) */
29145+static const int glXCreatePbuffer_signature[] =
29146+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
29147+
29148+static const int glXCreateGLXPbufferSGIX_signature[] =
29149+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29150+TYPE_ARRAY_INT };
29151+
29152+static const int glXDestroyPbuffer_signature[] =
29153+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29154+
29155+static const int glXDestroyGLXPbufferSGIX_signature[] =
29156+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29157+
29158+/* GLXContext glXCreateNewContext(Display * dpy
29159+ GLXFBConfig config
29160+ int renderType
29161+ GLXContext ShareList
29162+ Bool Direct) */
29163+static const int glXCreateNewContext_signature[] =
29164+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29165+TYPE_INT };
29166+
29167+static const int glXCreateContextWithConfigSGIX_signature[] =
29168+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29169+TYPE_INT };
29170+
29171+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
29172+static const int glXGetVisualFromFBConfig_signature[] =
29173+ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29174+
29175+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
29176+static const int glXGetFBConfigAttrib_signature[] =
29177+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29178+TYPE_OUT_1INT };
29179+
29180+static const int glXGetFBConfigAttribSGIX_signature[] =
29181+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29182+TYPE_OUT_1INT };
29183+
29184+static const int glXQueryContext_signature[] =
29185+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29186+TYPE_OUT_1INT };
29187+
29188+static const int glXQueryGLXPbufferSGIX_signature[] =
29189+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29190+TYPE_OUT_1INT };
29191+
29192+static const int glXQueryDrawable_signature[] =
29193+ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29194+TYPE_OUT_1INT };
29195+
29196+/* void glXUseXFont( Font font, int first, int count, int list ) */
29197+static const int glXUseXFont_signature[] =
29198+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29199+
29200+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
29201+static const int glXIsDirect_signature[] =
29202+ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29203+
29204+static const int glXGetScreenDriver_signature[] =
29205+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29206+
29207+static const int glXGetDriverConfig_signature[] =
29208+ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
29209+
29210+
29211+static const int glXWaitVideoSyncSGI_signature[] =
29212+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
29213+
29214+static const int glXGetVideoSyncSGI_signature[] =
29215+ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
29216+
29217+static const int glXSwapIntervalSGI_signature[] =
29218+ { TYPE_INT, 0, 1, TYPE_INT };
29219+
29220+static const int glXBindTexImageATI_signature[] =
29221+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29222+static const int glXReleaseTexImageATI_signature[] =
29223+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29224+static const int glXBindTexImageARB_signature[] =
29225+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29226+static const int glXReleaseTexImageARB_signature[] =
29227+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29228+
29229+/* const GLubyte * glGetString( GLenum name ) */
29230+static const int glGetString_signature[] =
29231+ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
29232+
29233+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
29234+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
29235+static const int glShaderSourceARB_fake_signature[] =
29236+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29237+static const int glShaderSource_fake_signature[] =
29238+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29239+
29240+static const int glVertexPointer_fake_signature[] =
29241+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29242+TYPE_ARRAY_CHAR };
29243+static const int glNormalPointer_fake_signature[] =
29244+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29245+TYPE_ARRAY_CHAR };
29246+static const int glColorPointer_fake_signature[] =
29247+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29248+TYPE_ARRAY_CHAR };
29249+static const int glSecondaryColorPointer_fake_signature[] =
29250+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29251+TYPE_ARRAY_CHAR };
29252+static const int glIndexPointer_fake_signature[] =
29253+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29254+TYPE_ARRAY_CHAR };
29255+static const int glTexCoordPointer_fake_signature[] =
29256+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29257+TYPE_INT, TYPE_ARRAY_CHAR };
29258+static const int glEdgeFlagPointer_fake_signature[] =
29259+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29260+static const int glVertexAttribPointerARB_fake_signature[] =
29261+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29262+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29263+static const int glVertexAttribPointerNV_fake_signature[] =
29264+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29265+TYPE_INT, TYPE_ARRAY_CHAR };
29266+static const int glWeightPointerARB_fake_signature[] =
29267+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29268+TYPE_ARRAY_CHAR };
29269+static const int glMatrixIndexPointerARB_fake_signature[] =
29270+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29271+TYPE_ARRAY_CHAR };
29272+static const int glFogCoordPointer_fake_signature[] =
29273+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29274+TYPE_ARRAY_CHAR };
29275+static const int glInterleavedArrays_fake_signature[] =
29276+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29277+TYPE_ARRAY_CHAR };
29278+static const int glElementPointerATI_fake_signature[] =
29279+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29280+static const int glVariantPointerEXT_fake_signature[] =
29281+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29282+TYPE_ARRAY_CHAR };
29283+static const int glTuxRacerDrawElements_fake_signature[] =
29284+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29285+static const int glVertexAndNormalPointer_fake_signature[] =
29286+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29287+TYPE_INT, TYPE_ARRAY_CHAR };
29288+static const int glTexCoordPointer01_fake_signature[] =
29289+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29290+TYPE_ARRAY_CHAR };
29291+static const int glTexCoordPointer012_fake_signature[] =
29292+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29293+TYPE_ARRAY_CHAR };
29294+static const int glVertexNormalPointerInterlaced_fake_signature[] =
29295+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29296+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29297+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
29298+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29299+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29300+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
29301+ { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29302+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29303+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
29304+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29305+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29306+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
29307+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29308+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29309+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
29310+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29311+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 };
29312+static const int
29313+ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
29314+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29315+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29316+TYPE_ARRAY_CHAR };
29317+static const int
29318+ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
29319+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29320+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29321+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29322+static const int
29323+ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
29324+ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29325+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29326+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29327+
29328+static const int glGenTextures_fake_signature[] =
29329+ { TYPE_NONE, 0, 1, TYPE_INT };
29330+static const int glGenBuffersARB_fake_signature[] =
29331+ { TYPE_NONE, 0, 1, TYPE_INT };
29332+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
29333+
29334+static const int _glDrawElements_buffer_signature[] =
29335+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29336+static const int _glDrawRangeElements_buffer_signature[] =
29337+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29338+TYPE_INT };
29339+static const int _glMultiDrawElements_buffer_signature[] =
29340+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
29341+TYPE_INT };
29342+
29343+static const int _glVertexPointer_buffer_signature[] =
29344+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29345+static const int _glNormalPointer_buffer_signature[] =
29346+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29347+static const int _glColorPointer_buffer_signature[] =
29348+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29349+static const int _glSecondaryColorPointer_buffer_signature[] =
29350+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29351+static const int _glIndexPointer_buffer_signature[] =
29352+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29353+static const int _glTexCoordPointer_buffer_signature[] =
29354+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29355+static const int _glEdgeFlagPointer_buffer_signature[] =
29356+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29357+static const int _glVertexAttribPointerARB_buffer_signature[] =
29358+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29359+TYPE_INT };
29360+static const int _glWeightPointerARB_buffer_signature[] =
29361+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29362+static const int _glMatrixIndexPointerARB_buffer_signature[] =
29363+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29364+static const int _glFogCoordPointer_buffer_signature[] =
29365+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29366+static const int _glVariantPointerEXT_buffer_signature[] =
29367+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29368+
29369+static const int _glReadPixels_pbo_signature[] =
29370+ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29371+TYPE_INT, TYPE_INT };
29372+static const int _glDrawPixels_pbo_signature[] =
29373+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29374+static const int _glMapBufferARB_fake_signature[] =
29375+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
29376+
29377+static const int _glSelectBuffer_fake_signature[] =
29378+ { TYPE_NONE, 0, 1, TYPE_INT };
29379+static const int _glGetSelectBuffer_fake_signature[] =
29380+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29381+static const int _glFeedbackBuffer_fake_signature[] =
29382+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29383+static const int _glGetFeedbackBuffer_fake_signature[] =
29384+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29385+
29386+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
29387+
29388+#define timesynchro_func -1
29389+#define memorize_array_func -2
29390+#define reuse_array_func -3
29391+
29392+#include "gl_func.h"
29393+
29394+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
29395+{
29396+ switch (pname) {
29397+ case GL_TEXTURE_MAG_FILTER:
29398+ case GL_TEXTURE_MIN_FILTER:
29399+ case GL_TEXTURE_WRAP_S:
29400+ case GL_TEXTURE_WRAP_T:
29401+ case GL_TEXTURE_PRIORITY:
29402+ case GL_TEXTURE_WRAP_R:
29403+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
29404+/* case GL_SHADOW_AMBIENT_SGIX:*/
29405+ case GL_TEXTURE_MIN_LOD:
29406+ case GL_TEXTURE_MAX_LOD:
29407+ case GL_TEXTURE_BASE_LEVEL:
29408+ case GL_TEXTURE_MAX_LEVEL:
29409+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
29410+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
29411+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
29412+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
29413+ case GL_GENERATE_MIPMAP:
29414+/* case GL_GENERATE_MIPMAP_SGIS:*/
29415+ case GL_TEXTURE_COMPARE_SGIX:
29416+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
29417+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
29418+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
29419+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
29420+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
29421+ case GL_TEXTURE_LOD_BIAS:
29422+/* case GL_TEXTURE_LOD_BIAS_EXT:*/
29423+ case GL_DEPTH_TEXTURE_MODE:
29424+/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
29425+ case GL_TEXTURE_COMPARE_MODE:
29426+/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
29427+ case GL_TEXTURE_COMPARE_FUNC:
29428+/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
29429+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
29430+ return 1;
29431+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
29432+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
29433+ return 2;
29434+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
29435+ return 3;
29436+ case GL_TEXTURE_BORDER_COLOR:
29437+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
29438+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
29439+ return 4;
29440+ default:
29441+ fprintf(err_file, "unhandled pname = %d\n", pname);
29442+ return 0;
29443+ }
29444+}
29445+
29446+static int __glLight_size(FILE *err_file, GLenum pname)
29447+{
29448+ switch (pname) {
29449+ case GL_AMBIENT:
29450+ case GL_DIFFUSE:
29451+ case GL_SPECULAR:
29452+ case GL_POSITION:
29453+ return 4;
29454+ break;
29455+
29456+ case GL_SPOT_DIRECTION:
29457+ return 3;
29458+ break;
29459+
29460+ case GL_SPOT_EXPONENT:
29461+ case GL_SPOT_CUTOFF:
29462+ case GL_CONSTANT_ATTENUATION:
29463+ case GL_LINEAR_ATTENUATION:
29464+ case GL_QUADRATIC_ATTENUATION:
29465+ return 1;
29466+ break;
29467+
29468+ default:
29469+ fprintf(err_file, "unhandled pname = %d\n", pname);
29470+ return 0;
29471+ }
29472+}
29473+
29474+static int __glMaterial_size(FILE *err_file, GLenum pname)
29475+{
29476+ switch (pname) {
29477+ case GL_AMBIENT:
29478+ case GL_DIFFUSE:
29479+ case GL_SPECULAR:
29480+ case GL_EMISSION:
29481+ case GL_AMBIENT_AND_DIFFUSE:
29482+ return 4;
29483+ break;
29484+
29485+ case GL_SHININESS:
29486+ return 1;
29487+ break;
29488+
29489+ case GL_COLOR_INDEXES:
29490+ return 3;
29491+ break;
29492+
29493+ default:
29494+ fprintf(err_file, "unhandled pname = %d\n", pname);
29495+ return 0;
29496+ }
29497+}
29498+
29499+static inline int compute_arg_length(FILE *err_file, int func_number,
29500+ int arg_i, arg_t *args)
29501+{
29502+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29503+ int *args_type = signature->args_type;
29504+
29505+ switch (func_number) {
29506+ case glProgramNamedParameter4fNV_func:
29507+ case glProgramNamedParameter4dNV_func:
29508+ case glProgramNamedParameter4fvNV_func:
29509+ case glProgramNamedParameter4dvNV_func:
29510+ case glGetProgramNamedParameterfvNV_func:
29511+ case glGetProgramNamedParameterdvNV_func:
29512+ if (arg_i == 2)
29513+ return 1 * args[arg_i - 1] *
29514+ tab_args_type_length[args_type[arg_i]];
29515+ break;
29516+
29517+ case glProgramStringARB_func:
29518+ case glLoadProgramNV_func:
29519+ case glGenProgramsNV_func:
29520+ case glDeleteProgramsNV_func:
29521+ case glGenProgramsARB_func:
29522+ case glDeleteProgramsARB_func:
29523+ case glRequestResidentProgramsNV_func:
29524+ case glDrawBuffers_func:
29525+ case glDrawBuffersARB_func:
29526+ case glDrawBuffersATI_func:
29527+ case glDeleteBuffers_func:
29528+ case glDeleteBuffersARB_func:
29529+ case glDeleteTextures_func:
29530+ case glDeleteTexturesEXT_func:
29531+ case glGenFramebuffersEXT_func:
29532+ case glDeleteFramebuffersEXT_func:
29533+ case glGenRenderbuffersEXT_func:
29534+ case glDeleteRenderbuffersEXT_func:
29535+ case glGenQueries_func:
29536+ case glGenQueriesARB_func:
29537+ case glDeleteQueries_func:
29538+ case glDeleteQueriesARB_func:
29539+ case glGenOcclusionQueriesNV_func:
29540+ case glDeleteOcclusionQueriesNV_func:
29541+ case glGenFencesNV_func:
29542+ case glDeleteFencesNV_func:
29543+ case glUniform1fv_func:
29544+ case glUniform1iv_func:
29545+ case glUniform1fvARB_func:
29546+ case glUniform1ivARB_func:
29547+ case glUniform1uivEXT_func:
29548+ case glVertexAttribs1dvNV_func:
29549+ case glVertexAttribs1fvNV_func:
29550+ case glVertexAttribs1svNV_func:
29551+ case glVertexAttribs1hvNV_func:
29552+ case glWeightbvARB_func:
29553+ case glWeightsvARB_func:
29554+ case glWeightivARB_func:
29555+ case glWeightfvARB_func:
29556+ case glWeightdvARB_func:
29557+ case glWeightubvARB_func:
29558+ case glWeightusvARB_func:
29559+ case glWeightuivARB_func:
29560+ case glPixelMapfv_func:
29561+ case glPixelMapuiv_func:
29562+ case glPixelMapusv_func:
29563+ case glProgramBufferParametersfvNV_func:
29564+ case glProgramBufferParametersIivNV_func:
29565+ case glProgramBufferParametersIuivNV_func:
29566+ case glTransformFeedbackAttribsNV_func:
29567+ case glTransformFeedbackVaryingsNV_func:
29568+ if (arg_i == signature->nb_args - 1)
29569+ return 1 * args[arg_i - 1] *
29570+ tab_args_type_length[args_type[arg_i]];
29571+ break;
29572+
29573+ case glUniform2fv_func:
29574+ case glUniform2iv_func:
29575+ case glUniform2fvARB_func:
29576+ case glUniform2ivARB_func:
29577+ case glUniform2uivEXT_func:
29578+ case glVertexAttribs2dvNV_func:
29579+ case glVertexAttribs2fvNV_func:
29580+ case glVertexAttribs2svNV_func:
29581+ case glVertexAttribs2hvNV_func:
29582+ case glDetailTexFuncSGIS_func:
29583+ case glSharpenTexFuncSGIS_func:
29584+ if (arg_i == signature->nb_args - 1)
29585+ return 2 * args[arg_i - 1] *
29586+ tab_args_type_length[args_type[arg_i]];
29587+ break;
29588+
29589+ case glUniform3fv_func:
29590+ case glUniform3iv_func:
29591+ case glUniform3fvARB_func:
29592+ case glUniform3ivARB_func:
29593+ case glUniform3uivEXT_func:
29594+ case glVertexAttribs3dvNV_func:
29595+ case glVertexAttribs3fvNV_func:
29596+ case glVertexAttribs3svNV_func:
29597+ case glVertexAttribs3hvNV_func:
29598+ if (arg_i == signature->nb_args - 1)
29599+ return 3 * args[arg_i - 1] *
29600+ tab_args_type_length[args_type[arg_i]];
29601+ break;
29602+
29603+ case glUniform4fv_func:
29604+ case glUniform4iv_func:
29605+ case glUniform4fvARB_func:
29606+ case glUniform4ivARB_func:
29607+ case glUniform4uivEXT_func:
29608+ case glVertexAttribs4dvNV_func:
29609+ case glVertexAttribs4fvNV_func:
29610+ case glVertexAttribs4svNV_func:
29611+ case glVertexAttribs4hvNV_func:
29612+ case glVertexAttribs4ubvNV_func:
29613+ case glProgramParameters4fvNV_func:
29614+ case glProgramParameters4dvNV_func:
29615+ case glProgramLocalParameters4fvEXT_func:
29616+ case glProgramEnvParameters4fvEXT_func:
29617+ case glProgramLocalParametersI4ivNV_func:
29618+ case glProgramLocalParametersI4uivNV_func:
29619+ case glProgramEnvParametersI4ivNV_func:
29620+ case glProgramEnvParametersI4uivNV_func:
29621+ if (arg_i == signature->nb_args - 1)
29622+ return 4 * args[arg_i - 1] *
29623+ tab_args_type_length[args_type[arg_i]];
29624+ break;
29625+
29626+ case glPrioritizeTextures_func:
29627+ case glPrioritizeTexturesEXT_func:
29628+ case glAreProgramsResidentNV_func:
29629+ case glAreTexturesResident_func:
29630+ case glAreTexturesResidentEXT_func:
29631+ if (arg_i == 1 || arg_i == 2)
29632+ return args[0] * tab_args_type_length[args_type[arg_i]];
29633+ break;
29634+
29635+ case glLightfv_func:
29636+ case glLightiv_func:
29637+ case glGetLightfv_func:
29638+ case glGetLightiv_func:
29639+ case glFragmentLightfvSGIX_func:
29640+ case glFragmentLightivSGIX_func:
29641+ case glGetFragmentLightfvSGIX_func:
29642+ case glGetFragmentLightivSGIX_func:
29643+ if (arg_i == signature->nb_args - 1)
29644+ return __glLight_size(err_file,
29645+ args[arg_i -
29646+ 1]) *
29647+ tab_args_type_length[args_type[arg_i]];
29648+ break;
29649+
29650+ case glLightModelfv_func:
29651+ case glLightModeliv_func:
29652+ if (arg_i == signature->nb_args - 1)
29653+ return ((args[arg_i - 1] ==
29654+ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
29655+ tab_args_type_length[args_type[arg_i]];
29656+ break;
29657+
29658+ case glFragmentLightModelfvSGIX_func:
29659+ case glFragmentLightModelivSGIX_func:
29660+ if (arg_i == signature->nb_args - 1)
29661+ return ((args[arg_i - 1] ==
29662+ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
29663+ tab_args_type_length[args_type[arg_i]];
29664+ break;
29665+
29666+ case glMaterialfv_func:
29667+ case glMaterialiv_func:
29668+ case glGetMaterialfv_func:
29669+ case glGetMaterialiv_func:
29670+ case glFragmentMaterialfvSGIX_func:
29671+ case glFragmentMaterialivSGIX_func:
29672+ case glGetFragmentMaterialfvSGIX_func:
29673+ case glGetFragmentMaterialivSGIX_func:
29674+ if (arg_i == signature->nb_args - 1)
29675+ return __glMaterial_size(err_file,
29676+ args[arg_i -
29677+ 1]) *
29678+ tab_args_type_length[args_type[arg_i]];
29679+ break;
29680+
29681+ case glTexParameterfv_func:
29682+ case glTexParameteriv_func:
29683+ case glGetTexParameterfv_func:
29684+ case glGetTexParameteriv_func:
29685+ case glTexParameterIivEXT_func:
29686+ case glTexParameterIuivEXT_func:
29687+ case glGetTexParameterIivEXT_func:
29688+ case glGetTexParameterIuivEXT_func:
29689+ if (arg_i == signature->nb_args - 1)
29690+ return __glTexParameter_size(err_file,
29691+ args[arg_i -
29692+ 1]) *
29693+ tab_args_type_length[args_type[arg_i]];
29694+ break;
29695+
29696+ case glFogiv_func:
29697+ case glFogfv_func:
29698+ if (arg_i == signature->nb_args - 1)
29699+ return ((args[arg_i - 1] ==
29700+ GL_FOG_COLOR) ? 4 : 1) *
29701+ tab_args_type_length[args_type[arg_i]];
29702+ break;
29703+
29704+ case glTexGendv_func:
29705+ case glTexGenfv_func:
29706+ case glTexGeniv_func:
29707+ case glGetTexGendv_func:
29708+ case glGetTexGenfv_func:
29709+ case glGetTexGeniv_func:
29710+ if (arg_i == signature->nb_args - 1)
29711+ return ((args[arg_i - 1] ==
29712+ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
29713+ tab_args_type_length[args_type[arg_i]];
29714+ break;
29715+
29716+ case glTexEnvfv_func:
29717+ case glTexEnviv_func:
29718+ case glGetTexEnvfv_func:
29719+ case glGetTexEnviv_func:
29720+ if (arg_i == signature->nb_args - 1)
29721+ return ((args[arg_i - 1] ==
29722+ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
29723+ tab_args_type_length[args_type[arg_i]];
29724+ break;
29725+
29726+ case glConvolutionParameterfv_func:
29727+ case glConvolutionParameteriv_func:
29728+ case glGetConvolutionParameterfv_func:
29729+ case glGetConvolutionParameteriv_func:
29730+ case glConvolutionParameterfvEXT_func:
29731+ case glConvolutionParameterivEXT_func:
29732+ case glGetConvolutionParameterfvEXT_func:
29733+ case glGetConvolutionParameterivEXT_func:
29734+ if (arg_i == signature->nb_args - 1)
29735+ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
29736+ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
29737+ args[arg_i - 1] ==
29738+ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
29739+ tab_args_type_length[args_type[arg_i]];
29740+ break;
29741+
29742+ case glGetVertexAttribfvARB_func:
29743+ case glGetVertexAttribfvNV_func:
29744+ case glGetVertexAttribfv_func:
29745+ case glGetVertexAttribdvARB_func:
29746+ case glGetVertexAttribdvNV_func:
29747+ case glGetVertexAttribdv_func:
29748+ case glGetVertexAttribivARB_func:
29749+ case glGetVertexAttribivNV_func:
29750+ case glGetVertexAttribiv_func:
29751+ case glGetVertexAttribIivEXT_func:
29752+ case glGetVertexAttribIuivEXT_func:
29753+ if (arg_i == signature->nb_args - 1)
29754+ return ((args[arg_i - 1] ==
29755+ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
29756+ tab_args_type_length[args_type[arg_i]];
29757+ break;
29758+
29759+
29760+ case glPointParameterfv_func:
29761+ case glPointParameterfvEXT_func:
29762+ case glPointParameterfvARB_func:
29763+ case glPointParameterfvSGIS_func:
29764+ case glPointParameteriv_func:
29765+ case glPointParameterivEXT_func:
29766+ if (arg_i == signature->nb_args - 1)
29767+ return ((args[arg_i - 1] ==
29768+ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
29769+ tab_args_type_length[args_type[arg_i]];
29770+ break;
29771+
29772+ case glUniformMatrix2fv_func:
29773+ case glUniformMatrix2fvARB_func:
29774+ if (arg_i == signature->nb_args - 1)
29775+ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
29776+ break;
29777+
29778+ case glUniformMatrix3fv_func:
29779+ case glUniformMatrix3fvARB_func:
29780+ if (arg_i == signature->nb_args - 1)
29781+ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29782+ break;
29783+
29784+ case glUniformMatrix4fv_func:
29785+ case glUniformMatrix4fvARB_func:
29786+ if (arg_i == signature->nb_args - 1)
29787+ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29788+ break;
29789+
29790+ case glUniformMatrix2x3fv_func:
29791+ case glUniformMatrix3x2fv_func:
29792+ if (arg_i == signature->nb_args - 1)
29793+ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29794+ break;
29795+
29796+ case glUniformMatrix2x4fv_func:
29797+ case glUniformMatrix4x2fv_func:
29798+ if (arg_i == signature->nb_args - 1)
29799+ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29800+ break;
29801+
29802+ case glUniformMatrix3x4fv_func:
29803+ case glUniformMatrix4x3fv_func:
29804+ if (arg_i == signature->nb_args - 1)
29805+ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29806+ break;
29807+
29808+ case glSpriteParameterivSGIX_func:
29809+ case glSpriteParameterfvSGIX_func:
29810+ if (arg_i == signature->nb_args - 1)
29811+ return ((args[arg_i - 1] ==
29812+ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
29813+ tab_args_type_length[args_type[arg_i]];
29814+ break;
29815+
29816+ default:
29817+ break;
29818+ }
29819+
29820+ fprintf(err_file,
29821+ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
29822+ func_number, arg_i);
29823+ return 0;
29824+}
29825+
29826+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
29827+ (func_number == glBitmap_func || \
29828+ func_number == _send_cursor_func || \
29829+ func_number == glTexImage1D_func || \
29830+ func_number == glTexImage2D_func || \
29831+ func_number == glTexImage3D_func || \
29832+ func_number == glBufferDataARB_func || \
29833+ func_number == glNewObjectBufferATI_func)
29834+
29835+#ifdef __amd64__
29836+#define _init_func _init64_func
29837+#else
29838+#ifdef __i386__
29839+#define _init_func _init32_func
29840+#else
29841+#error Unsupported ABI
29842+#endif
29843+#endif
29844diff --git a/target-i386/opengl_player.c b/target-i386/opengl_player.c
29845new file mode 100644
29846index 0000000..f071b7f
29847--- /dev/null
29848+++ b/target-i386/opengl_player.c
29849@@ -0,0 +1,1461 @@
29850+/*
29851+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
29852+ *
29853+ * Copyright (c) 2007 Even Rouault
29854+ *
29855+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29856+ * of this software and associated documentation files (the "Software"), to deal
29857+ * in the Software without restriction, including without limitation the rights
29858+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29859+ * copies of the Software, and to permit persons to whom the Software is
29860+ * furnished to do so, subject to the following conditions:
29861+ *
29862+ * The above copyright notice and this permission notice shall be included in
29863+ * all copies or substantial portions of the Software.
29864+ *
29865+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29866+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29867+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29868+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29869+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29870+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29871+ * THE SOFTWARE.
29872+ */
29873+
29874+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
29875+
29876+#include <stdlib.h>
29877+#include <stdio.h>
29878+#include <string.h>
29879+#include <assert.h>
29880+#include <unistd.h>
29881+#include <sys/time.h>
29882+#include <math.h>
29883+
29884+#include <GL/gl.h>
29885+#include <X11/Xlib.h>
29886+
29887+// TODO
29888+typedef long unsigned int target_phys_addr_t;
29889+
29890+#include "opengl_func.h"
29891+#include "opengl_utils.h"
29892+
29893+//#include "ffmpeg/avcodec.h"
29894+
29895+extern void init_process_tab(void);
29896+extern int do_function_call(int, arg_t *, char *);
29897+
29898+void do_disconnect_current(void);
29899+void do_context_switch(Display *dpy, pid_t pid, int call);
29900+
29901+typedef struct {
29902+ int n_used;
29903+ unsigned int crc;
29904+ int size;
29905+ long long last_use;
29906+} RecordBufferedArray;
29907+
29908+typedef struct {
29909+ int size;
29910+ long file_offset;
29911+} ReplayBufferedArray;
29912+
29913+#define N_BUFFERED_ARRAYS 1024
29914+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
29915+
29916+#define INSTR_WINDOW_SIZE 65536
29917+short instrWindow[INSTR_WINDOW_SIZE];
29918+int instrWindowCount = 0;
29919+int instrWindowPtr = 0;
29920+int instrWindowBeginPtr = 0;
29921+
29922+#include "ghash.c"
29923+
29924+#define PRIME 131
29925+
29926+typedef struct {
29927+ int iFirstOccur;
29928+ int nbOccur;
29929+ int hash;
29930+} SeqDesc;
29931+
29932+typedef struct {
29933+ int hash;
29934+ int offset;
29935+} HashElt;
29936+
29937+int sort_hash_N;
29938+short *sort_hash_tab;
29939+int count_compar;
29940+int collision_detected;
29941+
29942+static int sort_hash(const void *ptrA, const void *ptrB)
29943+{
29944+ const HashElt *a = (const HashElt *) ptrA;
29945+ const HashElt *b = (const HashElt *) ptrB;
29946+
29947+ count_compar++;
29948+ if (a->hash == b->hash) {
29949+ int j;
29950+
29951+ for (j = 0; j < sort_hash_N; j++) {
29952+ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
29953+ collision_detected = 1;
29954+ // fprintf(stderr, "collision de hash !\n");
29955+ return sort_hash_tab[a->offset + j] <
29956+ sort_hash_tab[b->offset + j] ? -1 : 1;
29957+ }
29958+ }
29959+ return a->offset - b->offset;
29960+ } else if (a->hash < b->hash)
29961+ return -1;
29962+ else
29963+ return 1;
29964+}
29965+
29966+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
29967+{
29968+ const SeqDesc *a = (const SeqDesc *) ptrA;
29969+ const SeqDesc *b = (const SeqDesc *) ptrB;
29970+
29971+ return b->nbOccur - a->nbOccur;
29972+}
29973+
29974+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
29975+{
29976+ const SeqDesc *a = (const SeqDesc *) ptrA;
29977+ const SeqDesc *b = (const SeqDesc *) ptrB;
29978+
29979+ return a->iFirstOccur - b->iFirstOccur;
29980+}
29981+
29982+void find_repeated_seq(short *tab, int iStart, int length)
29983+{
29984+ // SimpleHashTable* tableHash = simple_hash_table_new(free);
29985+ int N = 10;
29986+ int i;
29987+ int hash = 0;
29988+ int primeN = 1;
29989+ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
29990+
29991+ short *new_tab = malloc(sizeof(short) * length);
29992+ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
29993+ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
29994+ tab = new_tab;
29995+
29996+ sort_hash_N = N;
29997+ sort_hash_tab = tab;
29998+
29999+ fprintf(stderr, "(start) iStart = %d\n", iStart);
30000+ for (i = 0; i < N; i++) {
30001+ primeN *= PRIME;
30002+ }
30003+ for (i = 0; i < length; i++) {
30004+ hash = hash * PRIME + tab[i];
30005+ if (i >= N) {
30006+ hash -= tab[i - N] * primeN;
30007+ }
30008+ if (i >= N - 1) {
30009+ tabHash[i - (N - 1)].offset = i - (N - 1);
30010+ tabHash[i - (N - 1)].hash =
30011+ /* (i == 100) ? tabHash[0].hash : */ hash;
30012+#if 0
30013+ void **p_n_occurences =
30014+ simple_hash_table_lookup_pointer(tableHash, hash);
30015+ if (p_n_occurences == NULL) {
30016+ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
30017+
30018+ seqDesc->iFirstOccur = i - (N - 1);
30019+ seqDesc->nbOccur = 1;
30020+ simple_hash_table_insert(tableHash, hash, seqDesc);
30021+ } else {
30022+ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
30023+ int j;
30024+
30025+ for (j = 0; j < N; j++) {
30026+ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
30027+ tab[(iStart + i - (N - 1) + j) % length])
30028+ break;
30029+ }
30030+ if (j != N)
30031+ fprintf(stderr, "arg\n");
30032+ seqDesc->nbOccur++;
30033+ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
30034+ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
30035+ // seqDesc->nbOccur);
30036+ }
30037+#endif
30038+ }
30039+ }
30040+ collision_detected = 0;
30041+ count_compar = 0;
30042+ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
30043+ if (!collision_detected) {
30044+ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
30045+ int nbSeqDesc = 0;
30046+ int lastI = 0;
30047+ int prevHash = tabHash[0].hash;
30048+
30049+ for (i = 1; i < length - N + 1; i++) {
30050+ if (tabHash[i].hash != prevHash) {
30051+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
30052+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
30053+ tabSeqDesc[nbSeqDesc].hash = prevHash;
30054+ nbSeqDesc++;
30055+ lastI = i;
30056+ prevHash = tabHash[i].hash;
30057+ }
30058+ }
30059+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
30060+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
30061+ nbSeqDesc++;
30062+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
30063+ for (i = 0; i < nbSeqDesc; i++) {
30064+ if (tabSeqDesc[i].nbOccur < 10)
30065+ break;
30066+ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
30067+ // tabSeqDesc[i].nbOccur);
30068+ }
30069+ nbSeqDesc = i;
30070+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
30071+ sort_seq_desc_by_offset);
30072+ lastI = tabSeqDesc[0].iFirstOccur;
30073+ int maxI = 0;
30074+ int j = 0;
30075+
30076+ for (i = 1; i < nbSeqDesc; i++) {
30077+ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
30078+ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
30079+ maxI = i;
30080+ }
30081+ } else {
30082+ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
30083+ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
30084+ j++;
30085+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
30086+ lastI = tabSeqDesc[maxI].iFirstOccur;
30087+ while (i < nbSeqDesc &&
30088+ tabSeqDesc[i].iFirstOccur - lastI <= N)
30089+ i++;
30090+ if (i == nbSeqDesc)
30091+ break;
30092+ maxI = i;
30093+ }
30094+ }
30095+ nbSeqDesc = j;
30096+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
30097+ for (i = 0; i < nbSeqDesc; i++) {
30098+ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
30099+ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
30100+ tabSeqDesc[i].hash);
30101+ for (j = 0; j < N; j++)
30102+ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
30103+ fprintf(stderr, "\n");
30104+ }
30105+ free(tabSeqDesc);
30106+ } else {
30107+ fprintf(stderr, "collision de hash !\n");
30108+ }
30109+
30110+ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
30111+ count_compar);
30112+ // simple_hash_table_foreach(tableHash,
30113+ free(tabHash);
30114+ free(tab);
30115+#if 0
30116+ simple_hash_table_destroy(tableHash);
30117+#endif
30118+#if 0
30119+ int i, j, k;
30120+
30121+ for (i = 0; i < length; i++) {
30122+ int nMaxContiguous = 0;
30123+ int jMax = 0;
30124+
30125+ for (j = 0; j < length; j++) {
30126+ int nContiguous = 0;
30127+
30128+ for (k = 0; k < j - i; k++) {
30129+ if (tab[(iStart + i + k) % length] ==
30130+ tab[(iStart + i + j + k) % length]) {
30131+ nContiguous++;
30132+ } else
30133+ break;
30134+ }
30135+ if (nContiguous >= nMaxContiguous) {
30136+ nMaxContiguous = nContiguous;
30137+ jMax = j;
30138+ }
30139+ }
30140+ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
30141+ iStart, i, i + jMax, nMaxContiguous);
30142+ }
30143+#endif
30144+}
30145+
30146+#define MAX_SERVER_STATE_STACK_SIZE 16
30147+
30148+typedef struct {
30149+ GLbitfield mask;
30150+ int matrixMode;
30151+ int lastMatrixOp;
30152+} ServerState;
30153+
30154+typedef struct {
30155+ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
30156+ int stackAttribPtr;
30157+ int matrixMode;
30158+ int lastMatrixOp;
30159+} GLState;
30160+
30161+#define NB_STATES 100
30162+GLState states[NB_STATES];
30163+
30164+void usage()
30165+{
30166+ printf("Usage : opengl_player [OPTION] filename\n\n");
30167+ printf
30168+ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
30169+ printf("'-' is supported and stands for standard input\n\n");
30170+ printf("The following options are available :\n");
30171+ printf
30172+ ("--debug : output debugging trace on stderr\n");
30173+ printf("--disable-real-time-play-back : play as fast as possible\n");
30174+ printf
30175+ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
30176+ printf("--h or --help : display this help\n");
30177+}
30178+
30179+int main(int argc, char *argv[])
30180+{
30181+ static int args_size[50];
30182+ int i;
30183+ int visualid_fbconfig_read = -1;
30184+ int visualid_fbconfig_real = 0;
30185+ char *filename = "/tmp/debug_gl.bin";
30186+ int slowdown = 0;
30187+ int debug = 0;
30188+ char *ret_string;
30189+ arg_t args[50];
30190+ struct timeval start_time, last_time, current_time;
30191+ int noplay = 0;
30192+ int count_last_time = 0, count_current = 0;
30193+ int refresh_rate = 500;
30194+ int disable_real_time_play_back = 0;
30195+ int show_hard_disk_bandwith = 0;
30196+ int last_offset = 0;
30197+ int resize = 0;
30198+ int window_width = 0, window_height = 0;
30199+ int orig_window_width = 0;
30200+ int show_offset = 0;
30201+ int show_diff_offset = 0;
30202+ int last_cmd_offset = 0;
30203+ FILE *compressed_file = NULL;
30204+ int sizeBufferedArraysPlay = 0;
30205+ ReplayBufferedArray *replayBufferedArrays = NULL;
30206+ int currentState = 0;
30207+
30208+ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
30209+ memset(states, 0, sizeof(states));
30210+ for (i = 0; i < NB_STATES; i++) {
30211+ states[i].matrixMode = GL_MODELVIEW;
30212+ states[i].lastMatrixOp = -1;
30213+ }
30214+
30215+ /* avcodec_init(); AVCodec* avCodec =
30216+ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
30217+ * avCodecContext = avcodec_alloc_context(); */
30218+
30219+ for (i = 1; i < argc; i++) {
30220+ if (argv[i][0] == '-' && argv[i][1] == '-')
30221+ argv[i] = argv[i] + 1;
30222+
30223+ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
30224+ slowdown = atoi(argv[i] + strlen("-slowdown="));
30225+ } else if (strcmp(argv[i], "-noplay") == 0) {
30226+ noplay = 1;
30227+ } else if (strcmp(argv[i], "-debug") == 0) {
30228+ debug = 1;
30229+ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
30230+ disable_real_time_play_back = 1;
30231+ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
30232+ show_hard_disk_bandwith = 1;
30233+ } else if (strcmp(argv[i], "-show-offset") == 0) {
30234+ show_offset = 1;
30235+ } else
30236+ if (strncmp
30237+ (argv[i], "-show-diff-offset",
30238+ strlen("-show-diff-offset")) == 0) {
30239+ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
30240+ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
30241+ window_width = atoi(argv[i] + strlen("-width="));
30242+ resize = 1;
30243+ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
30244+ == 0) {
30245+ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
30246+ } else
30247+ if (strncmp
30248+ (argv[i], "-output-compressed-filename=",
30249+ strlen("-output-compressed-filename=")) == 0) {
30250+ char *compressed_filename =
30251+ argv[i] + strlen("-output-compressed-filename=");
30252+ compressed_file = fopen(compressed_filename, "wb");
30253+ } else if (strcmp(argv[i], "-") == 0) {
30254+ filename = NULL;
30255+ } else if (strcmp(argv[i], "-h") == 0 ||
30256+ strcmp(argv[i], "-help") == 0) {
30257+ usage();
30258+ return 0;
30259+ } else
30260+ filename = argv[i];
30261+ }
30262+ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
30263+
30264+ if (f == NULL) {
30265+ fprintf(stderr, "cannot open %s\n", filename);
30266+ return 0;
30267+ }
30268+ // FILE* fout = fopen("/tmp/raw", "wb");
30269+
30270+ init_process_tab();
30271+ ret_string = malloc(32768);
30272+
30273+ gettimeofday(&start_time, NULL);
30274+ gettimeofday(&last_time, NULL);
30275+
30276+// void* buffer= NULL;
30277+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30278+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30279+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30280+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30281+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30282+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
30283+
30284+ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
30285+ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
30286+
30287+ long long instr_count = 0;
30288+
30289+ while (1) {
30290+ short func_number;
30291+ short memorize_array_play = -1;
30292+ short reuse_array_play = -1;
30293+
30294+ begin:
30295+ if (fread(&func_number, sizeof(short), 1, f) == 0)
30296+ break;
30297+ if (func_number == _exit_process_func)
30298+ break;
30299+
30300+ if (func_number == _serialized_calls_func) {
30301+ continue;
30302+ }
30303+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
30304+
30305+ /*
30306+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
30307+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
30308+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
30309+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
30310+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
30311+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
30312+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
30313+
30314+ /* -1 is special code that indicates time synchro */
30315+ if (func_number == timesynchro_func) {
30316+ long long ts_file;
30317+ fread(&ts_file, sizeof(long long), 1, f);
30318+
30319+ if (compressed_file) {
30320+ WRITE_SHORT(timesynchro_func);
30321+ WRITE_LONGLONG(ts_file);
30322+ }
30323+
30324+ if (!disable_real_time_play_back) {
30325+ gettimeofday(&current_time, NULL);
30326+ long long ts_real =
30327+ (current_time.tv_sec -
30328+ start_time.tv_sec) * (long long) 1000000 +
30329+ current_time.tv_usec - start_time.tv_usec;
30330+ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
30331+ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
30332+ /* we're playing too fast */
30333+ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
30334+ // ts_real));
30335+ usleep((int) (ts_file - ts_real));
30336+ }
30337+ }
30338+ continue;
30339+ } else if (func_number == memorize_array_func) {
30340+ fread(&memorize_array_play, sizeof(short), 1, f);
30341+ goto begin;
30342+ } else if (func_number == reuse_array_func) {
30343+ fread(&reuse_array_play, sizeof(short), 1, f);
30344+ goto begin;
30345+ }
30346+
30347+ assert(func_number >= 0);
30348+
30349+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
30350+ int nb_args = signature->nb_args;
30351+ int *args_type = signature->args_type;
30352+
30353+ for (i = 0; i < nb_args; i++) {
30354+ switch (args_type[i]) {
30355+#if 0
30356+ case TYPE_UNSIGNED_CHAR:
30357+ case TYPE_CHAR:
30358+ {
30359+ char c;
30360+
30361+ fread(&c, sizeof(c), 1, f);
30362+ args[i] = c;
30363+ break;
30364+ }
30365+
30366+ case TYPE_UNSIGNED_SHORT:
30367+ case TYPE_SHORT:
30368+ {
30369+ short s;
30370+
30371+ fread(&s, sizeof(s), 1, f);
30372+ args[i] = s;
30373+ break;
30374+ }
30375+
30376+ case TYPE_FLOAT:
30377+ fread(&args[i], sizeof(int), 1, f);
30378+ break;
30379+
30380+#endif
30381+ case TYPE_UNSIGNED_CHAR:
30382+ case TYPE_CHAR:
30383+ case TYPE_UNSIGNED_INT:
30384+ case TYPE_INT:
30385+ case TYPE_UNSIGNED_SHORT:
30386+ case TYPE_SHORT:
30387+ case TYPE_FLOAT:
30388+ {
30389+ int n;
30390+ fread(&n, sizeof(int), 1, f);
30391+ args[i] = n;
30392+ break;
30393+ }
30394+
30395+ case TYPE_NULL_TERMINATED_STRING:
30396+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30397+ fread(&args_size[i], sizeof(int), 1, f);
30398+ if (args_size[i]) {
30399+ args[i] = (long) malloc(args_size[i]);
30400+ fread((void *) args[i], args_size[i], 1, f);
30401+ } else {
30402+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30403+ fprintf(stderr, "call %s arg %d\n",
30404+ tab_opengl_calls_name[func_number], i);
30405+ }
30406+ args[i] = 0;
30407+ }
30408+ if (reuse_array_play >= 0) {
30409+ long current_pos = ftell(f);
30410+
30411+ args_size[i] =
30412+ replayBufferedArrays[reuse_array_play].size;
30413+ args[i] = (long) malloc(args_size[i]);
30414+ fseek(f,
30415+ replayBufferedArrays[reuse_array_play].file_offset,
30416+ SEEK_SET);
30417+ fread((void *) args[i], args_size[i], 1, f);
30418+ fseek(f, current_pos, SEEK_SET);
30419+ }
30420+ if (memorize_array_play >= 0) {
30421+ assert(memorize_array_play <= sizeBufferedArraysPlay);
30422+ if (memorize_array_play == sizeBufferedArraysPlay) {
30423+ sizeBufferedArraysPlay++;
30424+ replayBufferedArrays =
30425+ realloc(replayBufferedArrays,
30426+ sizeBufferedArraysPlay *
30427+ sizeof(ReplayBufferedArray));
30428+ replayBufferedArrays[sizeBufferedArraysPlay -
30429+ 1].file_offset = 0;
30430+ }
30431+ replayBufferedArrays[memorize_array_play].file_offset =
30432+ ftell(f) - args_size[i];
30433+ replayBufferedArrays[memorize_array_play].size =
30434+ args_size[i];
30435+ }
30436+ break;
30437+
30438+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30439+ {
30440+ args_size[i] =
30441+ compute_arg_length(stderr, func_number, i, args);
30442+ args[i] =
30443+ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
30444+ fread((void *) args[i], args_size[i], 1, f);
30445+ break;
30446+ }
30447+
30448+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30449+ {
30450+ args_size[i] =
30451+ compute_arg_length(stderr, func_number, i, args);
30452+ args[i] = (long) malloc(args_size[i]);
30453+ break;
30454+ }
30455+
30456+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30457+ {
30458+ fread(&args_size[i], sizeof(int), 1, f);
30459+ if (args_size[i]) {
30460+ args[i] = (long) malloc(args_size[i]);
30461+ } else {
30462+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30463+ fprintf(stderr, "call %s arg %d\n",
30464+ tab_opengl_calls_name[func_number], i);
30465+ }
30466+ args[i] = 0;
30467+ }
30468+ break;
30469+ }
30470+
30471+ CASE_OUT_KNOWN_SIZE_POINTERS:
30472+ {
30473+ args_size[i] = tab_args_type_length[args_type[i]];
30474+ assert(args_size[i]);
30475+ args[i] = (long) malloc(args_size[i]);
30476+ break;
30477+ }
30478+
30479+ case TYPE_DOUBLE:
30480+ CASE_IN_KNOWN_SIZE_POINTERS:
30481+ args_size[i] = tab_args_type_length[args_type[i]];
30482+ args[i] = (long) malloc(args_size[i]);
30483+ fread((void *) args[i], args_size[i], 1, f);
30484+ break;
30485+
30486+ case TYPE_IN_IGNORED_POINTER:
30487+ args[i] = 0;
30488+ break;
30489+
30490+ default:
30491+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30492+ tab_opengl_calls_name[func_number], i);
30493+ do_disconnect_current();
30494+ return 0;
30495+ }
30496+ }
30497+ if (debug)
30498+ display_gl_call(stderr, func_number, args, args_size);
30499+
30500+ if (debug && reuse_array_play != -1)
30501+ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
30502+ if (debug && memorize_array_play != -1)
30503+ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
30504+
30505+ if (compressed_file) {
30506+ int reuse_array = -1;
30507+ int memorize_array = -1;
30508+ void *ptr = NULL;
30509+ int bytes_size = 0;
30510+ int do_default = 1;
30511+
30512+ switch (func_number) {
30513+ case glXMakeCurrent_func:
30514+ {
30515+ currentState = args[2];
30516+ assert(currentState >= 0 && currentState < NB_STATES);
30517+ break;
30518+ }
30519+
30520+ case glMatrixMode_func:
30521+ {
30522+ if (states[currentState].matrixMode == args[0]) {
30523+ do_default = 0;
30524+ } else {
30525+ states[currentState].matrixMode = args[0];
30526+ }
30527+ break;
30528+ }
30529+
30530+ case glLoadIdentity_func:
30531+ case glLoadMatrixd_func:
30532+ case glLoadMatrixf_func:
30533+ case glMultMatrixd_func:
30534+ case glMultMatrixf_func:
30535+ case glOrtho_func:
30536+ case glFrustum_func:
30537+ case glRotated_func:
30538+ case glRotatef_func:
30539+ case glScaled_func:
30540+ case glScalef_func:
30541+ case glTranslated_func:
30542+ case glTranslatef_func:
30543+ case glPushMatrix_func:
30544+ case glPopMatrix_func:
30545+ {
30546+ if (states[currentState].matrixMode == 5890) {
30547+ if (states[currentState].lastMatrixOp ==
30548+ glLoadIdentity_func &&
30549+ func_number == glLoadIdentity_func) {
30550+ do_default = 0;
30551+ }
30552+ states[currentState].lastMatrixOp = func_number;
30553+ }
30554+ break;
30555+ }
30556+
30557+ case glPushAttrib_func:
30558+ {
30559+ if (states[currentState].stackAttribPtr <
30560+ MAX_SERVER_STATE_STACK_SIZE) {
30561+ int mask = args[0];
30562+
30563+ states[currentState].stackAttrib[states[currentState].
30564+ stackAttribPtr].
30565+ mask = mask;
30566+ if (mask & GL_TRANSFORM_BIT) {
30567+ states[currentState].
30568+ stackAttrib[states[currentState].
30569+ stackAttribPtr].matrixMode =
30570+ states[currentState].matrixMode;
30571+ states[currentState].
30572+ stackAttrib[states[currentState].
30573+ stackAttribPtr].lastMatrixOp =
30574+ states[currentState].lastMatrixOp;
30575+ }
30576+ states[currentState].stackAttribPtr++;
30577+ }
30578+ break;
30579+ }
30580+
30581+ case glPopAttrib_func:
30582+ {
30583+ if (states[currentState].stackAttribPtr > 0) {
30584+ --states[currentState].stackAttribPtr;
30585+ if (states[currentState].
30586+ stackAttrib[states[currentState].stackAttribPtr].
30587+ mask & GL_TRANSFORM_BIT) {
30588+ states[currentState].matrixMode =
30589+ states[currentState].
30590+ stackAttrib[states[currentState].
30591+ stackAttribPtr].matrixMode;
30592+ states[currentState].lastMatrixOp =
30593+ states[currentState].
30594+ stackAttrib[states[currentState].
30595+ stackAttribPtr].lastMatrixOp;
30596+ }
30597+ }
30598+ break;
30599+ }
30600+
30601+ case glBufferDataARB_func:
30602+ {
30603+ ptr = (void *) args[2];
30604+ bytes_size = args_size[2];
30605+ break;
30606+ }
30607+
30608+ case glVertexPointer_fake_func:
30609+ case glTexCoordPointer_fake_func:
30610+ case glTexCoordPointer01_fake_func:
30611+ case glDrawElements_func:
30612+ {
30613+ ptr = (void *) args[nb_args - 1];
30614+ bytes_size = args_size[nb_args - 1];
30615+ break;
30616+ }
30617+
30618+ default:
30619+ break;
30620+ }
30621+
30622+ if (ptr) {
30623+ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
30624+ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
30625+ int iMinUsed = -1;
30626+
30627+ instr_count++;
30628+
30629+ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
30630+ if (recordBufferedArrays[i].crc == crc) {
30631+ // fprintf(stderr, "reusing %d for crc %d\n", i,
30632+ // crc);
30633+ reuse_array = i;
30634+ // fprintf(stderr, "reuse_array %d\n", i);
30635+ recordBufferedArrays[i].n_used++;
30636+ recordBufferedArrays[i].last_use = instr_count;
30637+ break;
30638+ } else if (recordBufferedArrays[i].n_used == 0) {
30639+ // fprintf(stderr, "memorize_array %d\n", i);
30640+ memorize_array = i;
30641+ recordBufferedArrays[i].n_used = 1;
30642+ recordBufferedArrays[i].crc = crc;
30643+ recordBufferedArrays[i].size = bytes_size;
30644+ recordBufferedArrays[i].last_use = instr_count;
30645+ break;
30646+ } else {
30647+ long long interest =
30648+ N_BUFFERED_ARRAYS *
30649+ recordBufferedArrays[i].n_used / (instr_count -
30650+ recordBufferedArrays
30651+ [i].
30652+ last_use)
30653+ /** recordBufferedArrays[i].size*/ ;
30654+ if (interest < minInterest) {
30655+ iMinUsed = i;
30656+ minInterest = interest;
30657+ }
30658+ }
30659+ }
30660+ static unsigned int *discardedCrcs = NULL;
30661+ static int nDiscardedCrcs = 0;
30662+
30663+ if (i == N_BUFFERED_ARRAYS) {
30664+ int j;
30665+
30666+ for (j = 0; j < nDiscardedCrcs; j++) {
30667+ if (discardedCrcs[j] == crc) {
30668+ fprintf(stderr,
30669+ "%x was discarded before and is asked now...\n",
30670+ crc);
30671+ discardedCrcs[j] =
30672+ recordBufferedArrays[iMinUsed].crc;
30673+ break;
30674+ }
30675+ }
30676+ if (j == nDiscardedCrcs) {
30677+ discardedCrcs =
30678+ realloc(discardedCrcs,
30679+ sizeof(int) * (nDiscardedCrcs + 1));
30680+ discardedCrcs[nDiscardedCrcs++] =
30681+ recordBufferedArrays[iMinUsed].crc;
30682+ }
30683+ fprintf(stderr, "discarding %x\n",
30684+ recordBufferedArrays[iMinUsed].crc);
30685+
30686+ memorize_array = iMinUsed;
30687+ recordBufferedArrays[iMinUsed].n_used = 1;
30688+ recordBufferedArrays[iMinUsed].crc = crc;
30689+ recordBufferedArrays[iMinUsed].size = bytes_size;
30690+ recordBufferedArrays[iMinUsed].last_use = instr_count;
30691+ }
30692+
30693+ if (reuse_array != -1) {
30694+ WRITE_SHORT(reuse_array_func);
30695+ WRITE_SHORT(reuse_array);
30696+ } else if (memorize_array != -1) {
30697+ WRITE_SHORT(memorize_array_func);
30698+ WRITE_SHORT(memorize_array);
30699+ }
30700+ }
30701+
30702+ switch (func_number) {
30703+ case glXChooseVisual_func:
30704+ case glXQueryVersion_func:
30705+ case glXQueryExtension_func:
30706+ case glXGetClientString_func:
30707+ case glXQueryExtensionsString_func:
30708+ case glXQueryServerString_func:
30709+ case glXGetProcAddress_fake_func:
30710+ case glXGetProcAddress_global_fake_func:
30711+ case glXGetConfig_func:
30712+ case glXGetConfig_extended_func:
30713+ case glGetIntegerv_func:
30714+ case glGetFloatv_func:
30715+ case glGetBooleanv_func:
30716+ case glGetDoublev_func:
30717+ case glIsEnabled_func:
30718+ case _glGetError_fake_func:
30719+ case glGetString_func:
30720+ {
30721+ do_default = 0;
30722+ break;
30723+ }
30724+
30725+ case glLoadMatrixd_func:
30726+ {
30727+ int j;
30728+
30729+ WRITE_SHORT(glLoadMatrixf_func);
30730+ double *ptr = (double *) args[0];
30731+
30732+ for (j = 0; j < 16; j++) {
30733+ WRITE_FLOAT(ptr[j]);
30734+ }
30735+ do_default = 0;
30736+ break;
30737+ }
30738+
30739+ case glMultMatrixd_func:
30740+ {
30741+ int j;
30742+
30743+ WRITE_SHORT(glMultMatrixf_func);
30744+ double *ptr = (double *) args[0];
30745+
30746+ for (j = 0; j < 16; j++) {
30747+ WRITE_FLOAT(ptr[j]);
30748+ }
30749+ do_default = 0;
30750+ break;
30751+ }
30752+
30753+ case glTranslated_func:
30754+ {
30755+ WRITE_SHORT(glTranslatef_func);
30756+ WRITE_FLOAT(*(double *) args[0]);
30757+ WRITE_FLOAT(*(double *) args[1]);
30758+ WRITE_FLOAT(*(double *) args[2]);
30759+ do_default = 0;
30760+ break;
30761+ }
30762+
30763+ case glScalef_func:
30764+ {
30765+ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
30766+ && *(float *) &args[2] == 1)
30767+ do_default = 0;
30768+ break;
30769+ }
30770+
30771+ case glScaled_func:
30772+ {
30773+ if (!
30774+ (*(double *) args[0] == 1 && *(double *) args[1] == 1
30775+ && *(double *) args[2] == 1)) {
30776+ WRITE_SHORT(glScalef_func);
30777+ WRITE_FLOAT(*(double *) args[0]);
30778+ WRITE_FLOAT(*(double *) args[1]);
30779+ WRITE_FLOAT(*(double *) args[2]);
30780+ }
30781+ do_default = 0;
30782+ break;
30783+ }
30784+
30785+ case glRotated_func:
30786+ {
30787+ WRITE_SHORT(glRotatef_func);
30788+ WRITE_FLOAT(*(double *) args[0]);
30789+ WRITE_FLOAT(*(double *) args[1]);
30790+ WRITE_FLOAT(*(double *) args[2]);
30791+ WRITE_FLOAT(*(double *) args[3]);
30792+ do_default = 0;
30793+ break;
30794+ }
30795+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
30796+
30797+ case glRasterPos2i_func:
30798+ {
30799+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30800+ WRITE_SHORT(glRasterPos2s_func);
30801+ WRITE_SHORT(args[0]);
30802+ WRITE_SHORT(args[1]);
30803+ do_default = 0;
30804+ }
30805+ break;
30806+ }
30807+
30808+ case glVertex2i_func:
30809+ {
30810+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30811+ WRITE_SHORT(glVertex2s_func);
30812+ WRITE_SHORT(args[0]);
30813+ WRITE_SHORT(args[1]);
30814+ do_default = 0;
30815+ }
30816+ break;
30817+ }
30818+
30819+ case glTexCoord2i_func:
30820+ {
30821+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30822+ WRITE_SHORT(glTexCoord2s_func);
30823+ WRITE_SHORT(args[0]);
30824+ WRITE_SHORT(args[1]);
30825+ do_default = 0;
30826+ }
30827+ break;
30828+ }
30829+
30830+ case glTexCoord2fv_func:
30831+ {
30832+ float *ptr = (float *) args[0];
30833+ float u = ptr[0];
30834+ float v = ptr[1];
30835+
30836+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30837+ int ui = (int) u;
30838+ int vi = (int) v;
30839+
30840+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30841+ WRITE_SHORT(glTexCoord2s_func);
30842+ WRITE_SHORT(ui);
30843+ WRITE_SHORT(vi);
30844+ do_default = 0;
30845+ }
30846+ }
30847+ break;
30848+ }
30849+
30850+ case glTexCoord2f_func:
30851+ {
30852+ float u = *(float *) &args[0];
30853+ float v = *(float *) &args[1];
30854+
30855+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30856+ int ui = (int) u;
30857+ int vi = (int) v;
30858+
30859+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30860+ WRITE_SHORT(glTexCoord2s_func);
30861+ WRITE_SHORT(ui);
30862+ WRITE_SHORT(vi);
30863+ do_default = 0;
30864+ }
30865+ }
30866+ break;
30867+ }
30868+
30869+ case glColor3f_func:
30870+ {
30871+ WRITE_SHORT(glColor3ub_func);
30872+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30873+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30874+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30875+ do_default = 0;
30876+ break;
30877+ }
30878+
30879+ case glColor4f_func:
30880+ {
30881+ if (*(float *) &args[3] == 1) {
30882+ WRITE_SHORT(glColor3ub_func);
30883+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30884+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30885+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30886+ } else {
30887+ WRITE_SHORT(glColor4ub_func);
30888+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30889+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30890+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30891+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
30892+ }
30893+ do_default = 0;
30894+ break;
30895+ }
30896+
30897+ case glColor4fv_func:
30898+ {
30899+ float *ptr = (float *) args[0];
30900+
30901+ if (ptr[3] == 1) {
30902+ WRITE_SHORT(glColor3ub_func);
30903+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30904+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30905+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30906+ } else {
30907+ WRITE_SHORT(glColor4ub_func);
30908+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30909+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30910+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30911+ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
30912+ }
30913+ do_default = 0;
30914+ break;
30915+ }
30916+
30917+ case glColor3d_func:
30918+ {
30919+ WRITE_SHORT(glColor3ub_func);
30920+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
30921+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
30922+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
30923+ do_default = 0;
30924+ break;
30925+ }
30926+
30927+ case glVertex3f_func:
30928+ {
30929+ if (*(float *) &args[2] == 0) {
30930+ WRITE_SHORT(glVertex2f_func);
30931+ WRITE_FLOAT(*(float *) &args[0]);
30932+ WRITE_FLOAT(*(float *) &args[1]);
30933+ do_default = 0;
30934+ }
30935+ break;
30936+ }
30937+
30938+ case glVertex3d_func:
30939+ {
30940+ WRITE_SHORT(glVertex3f_func);
30941+ WRITE_FLOAT(*(double *) args[0]);
30942+ WRITE_FLOAT(*(double *) args[1]);
30943+ WRITE_FLOAT(*(double *) args[2]);
30944+ do_default = 0;
30945+ break;
30946+ }
30947+
30948+ case glNormal3fv_func:
30949+ {
30950+ float *ptr = (float *) args[0];
30951+ float u = ptr[0];
30952+ float v = ptr[1];
30953+ float w = ptr[2];
30954+
30955+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
30956+ && fabs(w - (int) w) < 1e-7) {
30957+ int ui = (int) u;
30958+ int vi = (int) v;
30959+ int wi = (int) w;
30960+
30961+ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
30962+ WRITE_SHORT(glNormal3sv_func);
30963+ WRITE_SHORT(ui);
30964+ WRITE_SHORT(vi);
30965+ WRITE_SHORT(wi);
30966+ do_default = 0;
30967+ }
30968+ }
30969+ break;
30970+ }
30971+
30972+ case glNormal3d_func:
30973+ {
30974+ WRITE_SHORT(glNormal3f_func);
30975+ WRITE_FLOAT(*(double *) args[0]);
30976+ WRITE_FLOAT(*(double *) args[1]);
30977+ WRITE_FLOAT(*(double *) args[2]);
30978+ do_default = 0;
30979+ break;
30980+ }
30981+
30982+ case glDrawElements_func:
30983+ {
30984+ int mode = args[0];
30985+ int count = args[1];
30986+ int type = args[2];
30987+
30988+ if (type == GL_UNSIGNED_INT) {
30989+ int j;
30990+ unsigned int *ptr = (unsigned int *) args[3];
30991+
30992+ for (j = 0; j < count; j++) {
30993+ if ((ptr[j] >> 16) != 0)
30994+ break;
30995+ }
30996+ if (j == count) {
30997+ WRITE_SHORT(func_number);
30998+ WRITE_INT(mode);
30999+ WRITE_INT(count);
31000+ WRITE_INT(GL_UNSIGNED_SHORT);
31001+ if (reuse_array != -1) {
31002+ WRITE_INT(0);
31003+ } else {
31004+ WRITE_INT(count * sizeof(short));
31005+ for (j = 0; j < count; j++) {
31006+ WRITE_SHORT(ptr[j]);
31007+ }
31008+ }
31009+ do_default = 0;
31010+ } else
31011+ do_default = 1;
31012+ } else if (reuse_array != -1) {
31013+ WRITE_SHORT(func_number);
31014+ WRITE_INT(mode);
31015+ WRITE_INT(count);
31016+ WRITE_INT(type);
31017+ WRITE_INT(0);
31018+ do_default = 0;
31019+ } else
31020+ do_default = 1;
31021+ break;
31022+ }
31023+
31024+ case glBufferDataARB_func:
31025+ {
31026+ if (reuse_array != -1) {
31027+ WRITE_SHORT(glBufferDataARB_func);
31028+ WRITE_INT(args[0]);
31029+ WRITE_INT(args[1]);
31030+ WRITE_INT(0);
31031+ WRITE_INT(args[3]);
31032+ do_default = 0;
31033+ }
31034+ break;
31035+ }
31036+
31037+ case glVertexPointer_fake_func:
31038+ case glTexCoordPointer_fake_func:
31039+ case glTexCoordPointer01_fake_func:
31040+ {
31041+ int offset = 0, index = 0, size, type, stride, bytes_size;
31042+ void *ptr;
31043+ int countarg = 0;
31044+
31045+ if (func_number == glVertexPointer_fake_func ||
31046+ func_number == glTexCoordPointer_fake_func)
31047+ offset = args[countarg++];
31048+ if (func_number == glTexCoordPointer_fake_func)
31049+ index = args[countarg++];
31050+ size = args[countarg++];
31051+ type = args[countarg++];
31052+ stride = args[countarg++];
31053+ bytes_size = args[countarg++];
31054+ ptr = (void *) args[countarg++];
31055+ if (type == GL_DOUBLE) {
31056+ int count;
31057+ int j, k;
31058+
31059+ if (stride == 0)
31060+ stride = size * sizeof(double);
31061+ assert((bytes_size % stride) == 0);
31062+ assert((offset % stride) == 0);
31063+ offset = (offset / stride) * size * sizeof(float);
31064+ count = bytes_size / stride;
31065+ WRITE_SHORT(func_number);
31066+ if (func_number == glVertexPointer_fake_func ||
31067+ func_number == glTexCoordPointer_fake_func)
31068+ WRITE_INT(offset);
31069+ if (func_number == glTexCoordPointer_fake_func)
31070+ WRITE_INT(index);
31071+ WRITE_INT(size);
31072+ WRITE_INT(GL_FLOAT);
31073+ WRITE_INT(0);
31074+ WRITE_INT(count * size * sizeof(float));
31075+ if (reuse_array != -1) {
31076+ WRITE_INT(0);
31077+ } else {
31078+ WRITE_INT(count * size * sizeof(float));
31079+ for (j = 0; j < count; j++) {
31080+ for (k = 0; k < size; k++) {
31081+ WRITE_FLOAT(*(double *)
31082+ (ptr + j * stride +
31083+ k * sizeof(double)));
31084+ }
31085+ }
31086+ }
31087+ do_default = 0;
31088+ } else if (reuse_array != -1) {
31089+ WRITE_SHORT(func_number);
31090+ if (func_number == glVertexPointer_fake_func ||
31091+ func_number == glTexCoordPointer_fake_func)
31092+ WRITE_INT(offset);
31093+ if (func_number == glTexCoordPointer_fake_func)
31094+ WRITE_INT(index);
31095+ WRITE_INT(size);
31096+ WRITE_INT(type);
31097+ WRITE_INT(stride);
31098+ WRITE_INT(bytes_size);
31099+ WRITE_INT(0);
31100+ do_default = 0;
31101+ } else
31102+ do_default = 1;
31103+ break;
31104+ }
31105+
31106+ default:
31107+ break;
31108+ }
31109+
31110+ if (do_default) {
31111+ fwrite(&func_number, sizeof(short), 1, compressed_file);
31112+ for (i = 0; i < nb_args; i++) {
31113+ switch (args_type[i]) {
31114+ case TYPE_UNSIGNED_CHAR:
31115+ case TYPE_CHAR:
31116+ {
31117+ char c = args[i];
31118+
31119+ fwrite(&c, sizeof(c), 1, compressed_file);
31120+ break;
31121+ }
31122+
31123+ case TYPE_UNSIGNED_SHORT:
31124+ case TYPE_SHORT:
31125+ {
31126+ short s = args[i];
31127+
31128+ fwrite(&s, sizeof(s), 1, compressed_file);
31129+ break;
31130+ }
31131+
31132+ case TYPE_UNSIGNED_INT:
31133+ case TYPE_INT:
31134+ case TYPE_FLOAT:{
31135+ int n = args[i];
31136+ fwrite(&n, sizeof(int), 1, compressed_file);
31137+ break;
31138+ }
31139+
31140+ case TYPE_NULL_TERMINATED_STRING:
31141+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31142+ fwrite(&args_size[i], sizeof(int), 1,
31143+ compressed_file);
31144+ if (args_size[i]) {
31145+ fwrite((void *) args[i], args_size[i], 1,
31146+ compressed_file);
31147+ }
31148+ break;
31149+
31150+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31151+ {
31152+ fwrite(&args_size[i], sizeof(int), 1,
31153+ compressed_file);
31154+ break;
31155+ }
31156+
31157+ CASE_OUT_KNOWN_SIZE_POINTERS:
31158+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31159+ {
31160+ break;
31161+ }
31162+
31163+ case TYPE_DOUBLE:
31164+ CASE_IN_KNOWN_SIZE_POINTERS:
31165+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31166+ fwrite((void *) args[i], args_size[i], 1,
31167+ compressed_file);
31168+ break;
31169+
31170+ case TYPE_IN_IGNORED_POINTER:
31171+ break;
31172+
31173+ default:
31174+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31175+ tab_opengl_calls_name[func_number], i);
31176+ do_disconnect_current();
31177+ return 0;
31178+ }
31179+ }
31180+ }
31181+ }
31182+
31183+ int new_offset = ftell(f);
31184+
31185+ if (show_offset ||
31186+ (show_diff_offset &&
31187+ new_offset - last_cmd_offset >= show_diff_offset)) {
31188+ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
31189+ new_offset - last_cmd_offset);
31190+ }
31191+ last_cmd_offset = new_offset;
31192+
31193+ if (func_number == glXCreateContext_func &&
31194+ args[1] == visualid_fbconfig_read) {
31195+ args[1] = visualid_fbconfig_real;
31196+ }
31197+ if (debug) {
31198+ if (func_number == glBindProgramARB_func) {
31199+ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
31200+ (int) args[1]);
31201+ } else if (func_number == glXGetProcAddress_fake_func) {
31202+ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
31203+ (char *) args[0]);
31204+ }
31205+ }
31206+
31207+ if (debug && func_number == glEnable_func) {
31208+ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
31209+ } else if (debug && func_number == glDisable_func) {
31210+ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
31211+ }
31212+
31213+ if (resize) {
31214+ if (func_number == _moveResizeWindow_func) {
31215+ int *params = (int *) args[1];
31216+
31217+ orig_window_width = params[2];
31218+ window_height = params[3] =
31219+ params[3] * window_width / params[2];
31220+ params[2] = window_width;
31221+ // buffer = malloc(4 * window_width * window_height);
31222+ } else if (func_number == glViewport_func ||
31223+ func_number == glScissor_func) {
31224+ args[0] = args[0] * window_width / orig_window_width;
31225+ args[1] = args[1] * window_width / orig_window_width;
31226+ args[2] = args[2] * window_width / orig_window_width;
31227+ args[3] = args[3] * window_width / orig_window_width;
31228+ }
31229+ } else if (func_number == _moveResizeWindow_func) {
31230+ int *params = (int *) args[1];
31231+
31232+ window_width = params[2];
31233+ window_height = params[3];
31234+ // buffer = malloc(4 * window_width * window_height);
31235+ }
31236+
31237+ int ret =
31238+ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
31239+
31240+ if (func_number == glXSwapBuffers_func) {
31241+ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
31242+ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
31243+ * window_height, 1, fout); */
31244+
31245+ int diff_time;
31246+
31247+ count_current++;
31248+ gettimeofday(&current_time, NULL);
31249+ diff_time =
31250+ (current_time.tv_sec - last_time.tv_sec) * 1000 +
31251+ (current_time.tv_usec - last_time.tv_usec) / 1000;
31252+ if (diff_time > refresh_rate) {
31253+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31254+ count_current - count_last_time, diff_time / 1000.,
31255+ (count_current - count_last_time) * 1000. / diff_time);
31256+ if (show_hard_disk_bandwith) {
31257+ int current_offset = ftell(f);
31258+
31259+ printf("bandwidth : %.1f MB/s\n",
31260+ (current_offset - last_offset) * 1e-6);
31261+ last_offset = current_offset;
31262+ }
31263+ last_time.tv_sec = current_time.tv_sec;
31264+ last_time.tv_usec = current_time.tv_usec;
31265+ count_last_time = count_current;
31266+ }
31267+ usleep(slowdown * 50000);
31268+ }
31269+ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
31270+ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
31271+ *(int *) args[1]);
31272+ }
31273+
31274+ if (func_number == glXGetVisualFromFBConfig_func) {
31275+ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
31276+ visualid_fbconfig_real = ret;
31277+ }
31278+
31279+ for (i = 0; i < nb_args; i++) {
31280+ switch (args_type[i]) {
31281+ case TYPE_UNSIGNED_INT:
31282+ case TYPE_INT:
31283+ case TYPE_UNSIGNED_CHAR:
31284+ case TYPE_CHAR:
31285+ case TYPE_UNSIGNED_SHORT:
31286+ case TYPE_SHORT:
31287+ case TYPE_FLOAT:
31288+ break;
31289+
31290+ case TYPE_NULL_TERMINATED_STRING:
31291+ CASE_POINTERS:
31292+ case TYPE_DOUBLE:
31293+ if (args[i])
31294+ free((void *) args[i]);
31295+ break;
31296+
31297+ case TYPE_IN_IGNORED_POINTER:
31298+ args[i] = 0;
31299+ break;
31300+
31301+ default:
31302+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31303+ tab_opengl_calls_name[func_number], i);
31304+ do_disconnect_current();
31305+ return 0;
31306+ }
31307+ }
31308+ }
31309+ return 0;
31310+}
31311diff --git a/target-i386/opengl_server.c b/target-i386/opengl_server.c
31312new file mode 100644
31313index 0000000..80060ba
31314--- /dev/null
31315+++ b/target-i386/opengl_server.c
31316@@ -0,0 +1,826 @@
31317+/*
31318+ * TCP/IP OpenGL server
31319+ *
31320+ * Copyright (c) 2007 Even Rouault
31321+ *
31322+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31323+ * of this software and associated documentation files (the "Software"), to deal
31324+ * in the Software without restriction, including without limitation the rights
31325+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31326+ * copies of the Software, and to permit persons to whom the Software is
31327+ * furnished to do so, subject to the following conditions:
31328+ *
31329+ * The above copyright notice and this permission notice shall be included in
31330+ * all copies or substantial portions of the Software.
31331+ *
31332+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31333+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31334+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31335+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31336+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31337+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31338+ * THE SOFTWARE.
31339+ */
31340+
31341+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
31342+
31343+#include <stdio.h>
31344+#include <errno.h>
31345+#include <stdlib.h>
31346+#include <unistd.h>
31347+#include <string.h>
31348+#include <assert.h>
31349+#include <sys/types.h>
31350+#include <sys/socket.h>
31351+#include <netinet/in.h>
31352+#include <netinet/tcp.h>
31353+#include <netdb.h>
31354+#include <arpa/inet.h>
31355+#include <sys/time.h>
31356+#include <signal.h>
31357+
31358+#include <X11/Xlib.h>
31359+#include <X11/Xutil.h>
31360+
31361+#define PORT 5555
31362+
31363+#define ENABLE_GL_LOG
31364+
31365+#include "opengl_func.h"
31366+#include "opengl_utils.h"
31367+
31368+static int refresh_rate = 1000;
31369+static int must_save = 0;
31370+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
31371+
31372+extern int display_function_call;
31373+extern void init_process_tab(void);
31374+extern int do_function_call(Display *, int, int, arg_t *, char *);
31375+extern void opengl_exec_set_local_connection(void);
31376+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
31377+
31378+#ifdef ENABLE_GL_LOG
31379+static FILE* f = NULL;
31380+
31381+static char* filename = "/tmp/debug_gl.bin";
31382+
31383+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
31384+
31385+static void inline write_gl_debug_cmd_char(char my_int)
31386+{
31387+ write_gl_debug_init();
31388+ fwrite(&my_int, sizeof(my_int), 1, f);
31389+}
31390+
31391+static void inline write_gl_debug_cmd_short(short my_int)
31392+{
31393+ write_gl_debug_init();
31394+ fwrite(&my_int, sizeof(my_int), 1, f);
31395+}
31396+
31397+static void inline write_gl_debug_cmd_int(int my_int)
31398+{
31399+ write_gl_debug_init();
31400+ fwrite(&my_int, sizeof(my_int), 1, f);
31401+}
31402+
31403+static void inline write_gl_debug_cmd_longlong(long long my_longlong)
31404+{
31405+ write_gl_debug_init();
31406+ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
31407+}
31408+
31409+static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
31410+{
31411+ write_gl_debug_init();
31412+ fwrite(&size, sizeof(int), 1, f);
31413+ if (size)
31414+ fwrite(buffer, size, 1, f);
31415+}
31416+
31417+static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
31418+{
31419+ write_gl_debug_init();
31420+ if (size)
31421+ fwrite(buffer, size, 1, f);
31422+}
31423+
31424+static void inline write_gl_debug_end()
31425+{
31426+ write_gl_debug_init();
31427+ fclose(f);
31428+ f = NULL;
31429+}
31430+
31431+#endif
31432+
31433+static void write_sock_data(int sock, void* data, int len)
31434+{
31435+ if (len && data)
31436+ {
31437+ int offset = 0;
31438+ while(offset < len)
31439+ {
31440+ int nwritten = write(sock, data + offset, len - offset);
31441+ if (nwritten == -1)
31442+ {
31443+ if (errno == EINTR)
31444+ continue;
31445+ perror("write");
31446+ assert(nwritten != -1);
31447+ }
31448+ offset += nwritten;
31449+ }
31450+ }
31451+}
31452+
31453+static void inline write_sock_int(int sock, int my_int)
31454+{
31455+ write_sock_data(sock, &my_int, sizeof(int));
31456+}
31457+
31458+static int total_read = 0;
31459+static void read_sock_data(int sock, void* data, int len)
31460+{
31461+ if (len)
31462+ {
31463+ int offset = 0;
31464+ while(offset < len)
31465+ {
31466+ int nread = read(sock, data + offset, len - offset);
31467+ if (nread == -1)
31468+ {
31469+ if (errno == EINTR)
31470+ continue;
31471+ perror("read");
31472+ assert(nread != -1);
31473+ }
31474+ if (nread == 0)
31475+ {
31476+ fprintf(stderr, "nread = 0\n");
31477+ }
31478+ assert(nread > 0);
31479+ offset += nread;
31480+ total_read += nread;
31481+ }
31482+ }
31483+}
31484+
31485+static int inline read_sock_int(int sock)
31486+{
31487+ int ret;
31488+ read_sock_data(sock, &ret, sizeof(int));
31489+ return ret;
31490+}
31491+
31492+static short inline read_sock_short(int sock)
31493+{
31494+ short ret;
31495+ read_sock_data(sock, &ret, sizeof(short));
31496+ return ret;
31497+}
31498+
31499+
31500+static Display* dpy = NULL;
31501+static int parent_xid = -1;
31502+
31503+
31504+static struct timeval last_time, current_time, time_stamp_start;
31505+static int count_last_time = 0, count_current = 0;
31506+
31507+static struct timeval last_read_time, current_read_time;
31508+
31509+int has_x_error = 0;
31510+
31511+int
31512+read_from_client (int sock)
31513+{
31514+ arg_t args[50];
31515+ int args_size[50];
31516+ char ret_string[32768];
31517+ char command_buffer[65536*16];
31518+
31519+ if (dpy == NULL)
31520+ {
31521+ init_process_tab();
31522+ dpy = XOpenDisplay(NULL);
31523+ if (parent_xid != -1)
31524+ {
31525+ opengl_exec_set_parent_window(dpy, parent_xid);
31526+ }
31527+ }
31528+
31529+ int i;
31530+ int func_number = read_sock_short(sock);
31531+
31532+ Signature* signature = (Signature*)tab_opengl_calls[func_number];
31533+ int ret_type = signature->ret_type;
31534+ int nb_args = signature->nb_args;
31535+ int* args_type = signature->args_type;
31536+ int pid = 0;
31537+
31538+ if (func_number == _serialized_calls_func)
31539+ {
31540+ int command_buffer_size = read_sock_int(sock);
31541+ int commmand_buffer_offset = 0;
31542+ read_sock_data(sock, command_buffer, command_buffer_size);
31543+ /* TODO: must convert if client is different word size */
31544+
31545+#ifdef ENABLE_GL_LOG
31546+ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
31547+#endif
31548+
31549+ while(commmand_buffer_offset < command_buffer_size)
31550+ {
31551+ func_number = *(short*)(command_buffer + commmand_buffer_offset);
31552+ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
31553+ {
31554+ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
31555+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
31556+ commmand_buffer_offset, command_buffer_size);
31557+ exit(-1);
31558+ }
31559+
31560+#ifdef ENABLE_GL_LOG
31561+ if (must_save) write_gl_debug_cmd_short(func_number);
31562+#endif
31563+ commmand_buffer_offset += sizeof(short);
31564+
31565+
31566+ signature = (Signature*)tab_opengl_calls[func_number];
31567+ ret_type = signature->ret_type;
31568+ assert(ret_type == TYPE_NONE);
31569+ nb_args = signature->nb_args;
31570+ args_type = signature->args_type;
31571+
31572+ for(i=0;i<nb_args;i++)
31573+ {
31574+ switch(args_type[i])
31575+ {
31576+ case TYPE_UNSIGNED_CHAR:
31577+ case TYPE_CHAR:
31578+ {
31579+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31580+#ifdef ENABLE_GL_LOG
31581+ if (must_save) write_gl_debug_cmd_char(args[i]);
31582+#endif
31583+ commmand_buffer_offset += sizeof(int);
31584+ break;
31585+ }
31586+
31587+ case TYPE_UNSIGNED_SHORT:
31588+ case TYPE_SHORT:
31589+ {
31590+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31591+#ifdef ENABLE_GL_LOG
31592+ if (must_save) write_gl_debug_cmd_short(args[i]);
31593+#endif
31594+ commmand_buffer_offset += sizeof(int);
31595+ break;
31596+ }
31597+
31598+ case TYPE_UNSIGNED_INT:
31599+ case TYPE_INT:
31600+ case TYPE_FLOAT:
31601+ {
31602+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31603+#ifdef ENABLE_GL_LOG
31604+ if (must_save) write_gl_debug_cmd_int(args[i]);
31605+#endif
31606+ commmand_buffer_offset += sizeof(int);
31607+ break;
31608+ }
31609+
31610+ case TYPE_NULL_TERMINATED_STRING:
31611+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31612+ {
31613+ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
31614+ commmand_buffer_offset += sizeof(int);
31615+
31616+ if (args_size[i] == 0)
31617+ {
31618+ args[i] = 0;
31619+ }
31620+ else
31621+ {
31622+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31623+ }
31624+
31625+ if (args[i] == 0)
31626+ {
31627+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31628+ {
31629+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31630+ return 0;
31631+ }
31632+ }
31633+#ifdef ENABLE_GL_LOG
31634+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31635+#endif
31636+ commmand_buffer_offset += args_size[i];
31637+
31638+ break;
31639+ }
31640+
31641+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31642+ {
31643+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31644+ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
31645+#ifdef ENABLE_GL_LOG
31646+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31647+#endif
31648+ commmand_buffer_offset += args_size[i];
31649+ break;
31650+ }
31651+
31652+ CASE_OUT_POINTERS:
31653+ {
31654+ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31655+ return 0;
31656+ break;
31657+ }
31658+
31659+ case TYPE_DOUBLE:
31660+ CASE_IN_KNOWN_SIZE_POINTERS:
31661+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31662+ args_size[i] = tab_args_type_length[args_type[i]];
31663+#ifdef ENABLE_GL_LOG
31664+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31665+#endif
31666+ commmand_buffer_offset += tab_args_type_length[args_type[i]];
31667+ break;
31668+
31669+ case TYPE_IN_IGNORED_POINTER:
31670+ args[i] = 0;
31671+ break;
31672+
31673+ default:
31674+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31675+ return 0;
31676+ break;
31677+ }
31678+ }
31679+
31680+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31681+
31682+ do_function_call(dpy, func_number, 1, args, ret_string);
31683+ }
31684+ }
31685+ else
31686+ {
31687+#ifdef ENABLE_GL_LOG
31688+ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
31689+#endif
31690+
31691+ for(i=0;i<nb_args;i++)
31692+ {
31693+ switch(args_type[i])
31694+ {
31695+ case TYPE_UNSIGNED_CHAR:
31696+ case TYPE_CHAR:
31697+ args[i] = read_sock_int(sock);
31698+#ifdef ENABLE_GL_LOG
31699+ if (must_save) write_gl_debug_cmd_char(args[i]);
31700+#endif
31701+ break;
31702+
31703+ case TYPE_UNSIGNED_SHORT:
31704+ case TYPE_SHORT:
31705+ args[i] = read_sock_int(sock);
31706+#ifdef ENABLE_GL_LOG
31707+ if (must_save) write_gl_debug_cmd_short(args[i]);
31708+#endif
31709+ break;
31710+
31711+ case TYPE_UNSIGNED_INT:
31712+ case TYPE_INT:
31713+ case TYPE_FLOAT:
31714+ args[i] = read_sock_int(sock);
31715+#ifdef ENABLE_GL_LOG
31716+ if (must_save) write_gl_debug_cmd_int(args[i]);
31717+#endif
31718+ break;
31719+
31720+ case TYPE_NULL_TERMINATED_STRING:
31721+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31722+ {
31723+ args_size[i] = read_sock_int(sock);
31724+ if (args_size[i])
31725+ {
31726+ args[i] = (long)malloc(args_size[i]);
31727+ read_sock_data(sock, (void*)args[i], args_size[i]);
31728+ }
31729+ else
31730+ {
31731+ args[i] = 0;
31732+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31733+ {
31734+ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31735+ return 0;
31736+ }
31737+ }
31738+#ifdef ENABLE_GL_LOG
31739+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31740+#endif
31741+ break;
31742+ }
31743+
31744+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31745+ {
31746+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31747+ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
31748+ read_sock_data(sock, (void*)args[i], args_size[i]);
31749+#ifdef ENABLE_GL_LOG
31750+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31751+#endif
31752+ break;
31753+ }
31754+
31755+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31756+ {
31757+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31758+ args[i] = (long)malloc(args_size[i]);
31759+ break;
31760+ }
31761+
31762+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31763+ {
31764+ args_size[i] = read_sock_int(sock);
31765+ if (func_number == glGetProgramLocalParameterdvARB_func)
31766+ {
31767+ fprintf(stderr, "size = %d\n", args_size[i]);
31768+ }
31769+ if (args_size[i])
31770+ {
31771+ args[i] = (long)malloc(args_size[i]);
31772+ }
31773+ else
31774+ {
31775+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31776+ {
31777+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31778+ return 0;
31779+ };
31780+ args[i] = 0;
31781+ }
31782+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31783+#ifdef ENABLE_GL_LOG
31784+ if (must_save) write_gl_debug_cmd_int(args_size[i]);
31785+#endif
31786+ break;
31787+ }
31788+
31789+ CASE_OUT_KNOWN_SIZE_POINTERS:
31790+ {
31791+ args_size[i] = tab_args_type_length[args_type[i]];
31792+ assert(args_size[i]);
31793+ args[i] = (long)malloc(args_size[i]);
31794+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31795+ break;
31796+ }
31797+
31798+ case TYPE_DOUBLE:
31799+ CASE_IN_KNOWN_SIZE_POINTERS:
31800+ args_size[i] = tab_args_type_length[args_type[i]];
31801+ args[i] = (long)malloc(args_size[i]);
31802+ read_sock_data(sock, (void*)args[i], args_size[i]);
31803+#ifdef ENABLE_GL_LOG
31804+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31805+#endif
31806+ break;
31807+
31808+ case TYPE_IN_IGNORED_POINTER:
31809+ args[i] = 0;
31810+ break;
31811+
31812+ default:
31813+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31814+ return 0;
31815+ break;
31816+ }
31817+ }
31818+
31819+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31820+
31821+ if (getenv("ALWAYS_FLUSH")) fflush(f);
31822+
31823+ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
31824+#ifdef ENABLE_GL_LOG
31825+ if (must_save && func_number == glXGetVisualFromFBConfig_func)
31826+ {
31827+ write_gl_debug_cmd_int(ret);
31828+ }
31829+#endif
31830+
31831+ for(i=0;i<nb_args;i++)
31832+ {
31833+ switch(args_type[i])
31834+ {
31835+ case TYPE_UNSIGNED_INT:
31836+ case TYPE_INT:
31837+ case TYPE_UNSIGNED_CHAR:
31838+ case TYPE_CHAR:
31839+ case TYPE_UNSIGNED_SHORT:
31840+ case TYPE_SHORT:
31841+ case TYPE_FLOAT:
31842+ break;
31843+
31844+ case TYPE_NULL_TERMINATED_STRING:
31845+ case TYPE_DOUBLE:
31846+ CASE_IN_POINTERS:
31847+ if (args[i]) free((void*)args[i]);
31848+ break;
31849+
31850+ CASE_OUT_POINTERS:
31851+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31852+ write_sock_data(sock, (void*)args[i], args_size[i]);
31853+ if (display_function_call)
31854+ {
31855+ if (args_type[i] == TYPE_OUT_1INT)
31856+ {
31857+ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
31858+ }
31859+ else if (args_type[i] == TYPE_OUT_1FLOAT)
31860+ {
31861+ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
31862+ }
31863+ }
31864+ if (args[i]) free((void*)args[i]);
31865+ break;
31866+
31867+ case TYPE_IN_IGNORED_POINTER:
31868+ args[i] = 0;
31869+ break;
31870+
31871+ default:
31872+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31873+ return 0;
31874+ break;
31875+ }
31876+ }
31877+
31878+ if (signature->ret_type == TYPE_CONST_CHAR)
31879+ {
31880+ write_sock_int(sock, strlen(ret_string) + 1);
31881+ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
31882+ }
31883+ else if (signature->ret_type != TYPE_NONE)
31884+ {
31885+ write_sock_int(sock, ret);
31886+ }
31887+
31888+#ifdef ENABLE_GL_LOG
31889+ if (must_save && func_number == _exit_process_func)
31890+ {
31891+ write_gl_debug_end();
31892+ }
31893+#endif
31894+ if (func_number == _exit_process_func)
31895+ {
31896+ return -1;
31897+ }
31898+ else if (func_number == glXSwapBuffers_func)
31899+ {
31900+ int diff_time;
31901+ count_current++;
31902+ gettimeofday(&current_time, NULL);
31903+#ifdef ENABLE_GL_LOG
31904+ if (must_save && timestamp)
31905+ {
31906+ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
31907+ /* -1 is special code that indicates time synchro */
31908+ write_gl_debug_cmd_short(timesynchro_func);
31909+ write_gl_debug_cmd_longlong(ts);
31910+ }
31911+#endif
31912+ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
31913+ if (diff_time > refresh_rate)
31914+ {
31915+#ifdef ENABLE_GL_LOG
31916+ fflush(f);
31917+#endif
31918+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31919+ count_current - count_last_time,
31920+ diff_time / 1000.,
31921+ (count_current - count_last_time) * 1000. / diff_time);
31922+ last_time.tv_sec = current_time.tv_sec;
31923+ last_time.tv_usec = current_time.tv_usec;
31924+ count_last_time = count_current;
31925+ }
31926+ }
31927+ }
31928+ return 0;
31929+}
31930+
31931+int
31932+make_socket (uint16_t port)
31933+{
31934+ int sock;
31935+ struct sockaddr_in name;
31936+
31937+ /* Create the socket. */
31938+ sock = socket (PF_INET, SOCK_STREAM, 0);
31939+ if (sock < 0)
31940+ {
31941+ perror ("socket");
31942+ exit (EXIT_FAILURE);
31943+ }
31944+
31945+ /* Give the socket a name. */
31946+ name.sin_family = AF_INET;
31947+ name.sin_port = htons (port);
31948+ name.sin_addr.s_addr = htonl (INADDR_ANY);
31949+ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
31950+ {
31951+ perror ("bind");
31952+ exit (EXIT_FAILURE);
31953+ }
31954+
31955+ return sock;
31956+}
31957+
31958+static int x_error_handler(Display *display,
31959+ XErrorEvent *error)
31960+{
31961+ char buf[64];
31962+ XGetErrorText(display, error->error_code, buf, 63);
31963+ fprintf (stderr, "The program received an X Window System error.\n"
31964+ "This probably reflects a bug in the program.\n"
31965+ "The error was '%s'.\n"
31966+ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
31967+ buf,
31968+ error->serial,
31969+ error->error_code,
31970+ error->request_code,
31971+ error->minor_code);
31972+ has_x_error = 1;
31973+ return 0;
31974+}
31975+
31976+void usage()
31977+{
31978+ printf("Usage : opengl_server [OPTION]\n\n");
31979+ printf("The following options are available :\n");
31980+ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
31981+ printf("--debug : output debugging trace on stderr\n");
31982+ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
31983+ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
31984+ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
31985+ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
31986+ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
31987+ printf(" or from another emulator, through TCP/IP\n");
31988+ printf("--h or --help : display this help\n");
31989+}
31990+
31991+int
31992+main (int argc, char* argv[])
31993+{
31994+ int sock;
31995+ fd_set active_fd_set, read_fd_set;
31996+ int i;
31997+ struct sockaddr_in clientname;
31998+ socklen_t size;
31999+ int port = PORT;
32000+ int different_windows = 0;
32001+
32002+ for(i=1;i<argc;i++)
32003+ {
32004+ if (argv[i][0] == '-' && argv[i][1] == '-')
32005+ argv[i] = argv[i]+1;
32006+
32007+ if (strcmp(argv[i], "-debug") == 0)
32008+ {
32009+ display_function_call = 1;
32010+ }
32011+ else if (strcmp(argv[i], "-save") == 0)
32012+ {
32013+ must_save = 1;
32014+ }
32015+ else if (strncmp(argv[i], "-port=",6) == 0)
32016+ {
32017+ port = atoi(argv[i] + 6);
32018+ }
32019+ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
32020+ {
32021+ filename = argv[i] + strlen("-filename=");
32022+ }
32023+ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
32024+ {
32025+ char* c = argv[i] + strlen("-parent-xid=");
32026+ parent_xid = strtol(c, NULL, 0);
32027+ different_windows = 1;
32028+ }
32029+ else if (strcmp(argv[i], "-different-windows") == 0)
32030+ {
32031+ different_windows = 1;
32032+ }
32033+ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
32034+ {
32035+ usage();
32036+ return 0;
32037+ }
32038+ else
32039+ {
32040+ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
32041+ usage();
32042+ return -1;
32043+ }
32044+ }
32045+
32046+ /* Create the socket and set it up to accept connections. */
32047+ sock = make_socket (port);
32048+
32049+ int flag = 1;
32050+ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
32051+ {
32052+ perror("setsockopt SO_REUSEADDR");
32053+ }
32054+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
32055+ {
32056+ perror("setsockopt TCP_NODELAY");
32057+ }
32058+
32059+ if (listen (sock, 1) < 0)
32060+ {
32061+ perror ("listen");
32062+ exit (EXIT_FAILURE);
32063+ }
32064+
32065+ struct sigaction action;
32066+ action.sa_handler = SIG_IGN;
32067+ action.sa_flags = SA_NOCLDWAIT;
32068+ sigaction(SIGCHLD,&action,NULL);
32069+
32070+ FD_ZERO (&active_fd_set);
32071+ FD_SET (sock, &active_fd_set);
32072+
32073+ while(1)
32074+ {
32075+ int new, pid;
32076+
32077+ read_fd_set = active_fd_set;
32078+ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
32079+ {
32080+ perror ("select");
32081+ exit (EXIT_FAILURE);
32082+ }
32083+
32084+ size = sizeof (clientname);
32085+ new = accept (sock, (struct sockaddr *) &clientname, &size);
32086+ if (new < 0)
32087+ {
32088+ perror ("accept");
32089+ exit (EXIT_FAILURE);
32090+ }
32091+ pid = fork();
32092+ if (pid == -1)
32093+ {
32094+ perror ("fork");
32095+ exit(EXIT_FAILURE);
32096+ }
32097+ if (pid == 0)
32098+ {
32099+ close(sock);
32100+
32101+ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
32102+ inet_ntoa (clientname.sin_addr),
32103+ ntohs (clientname.sin_port));
32104+
32105+ gettimeofday(&last_time, NULL);
32106+ gettimeofday(&last_read_time, NULL);
32107+
32108+ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
32109+ different_windows == 0)
32110+ {
32111+ opengl_exec_set_local_connection();
32112+ }
32113+
32114+ if (timestamp)
32115+ {
32116+ gettimeofday(&time_stamp_start, NULL);
32117+ }
32118+
32119+ XSetErrorHandler(x_error_handler);
32120+
32121+ while(1)
32122+ {
32123+ if (read_from_client (new) < 0)
32124+ {
32125+ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
32126+
32127+ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
32128+ inet_ntoa (clientname.sin_addr),
32129+ ntohs (clientname.sin_port));
32130+
32131+ return 0;
32132+ }
32133+ }
32134+ }
32135+ else
32136+ {
32137+ close(new);
32138+ }
32139+ }
32140+
32141+ return 0;
32142+}
32143diff --git a/target-i386/opengl_utils.h b/target-i386/opengl_utils.h
32144new file mode 100644
32145index 0000000..01077ff
32146--- /dev/null
32147+++ b/target-i386/opengl_utils.h
32148@@ -0,0 +1,453 @@
32149+/*
32150+ * Functions used by host & client sides
32151+ *
32152+ * Copyright (c) 2007 Even Rouault
32153+ *
32154+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32155+ * of this software and associated documentation files (the "Software"), to deal
32156+ * in the Software without restriction, including without limitation the rights
32157+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32158+ * copies of the Software, and to permit persons to whom the Software is
32159+ * furnished to do so, subject to the following conditions:
32160+ *
32161+ * The above copyright notice and this permission notice shall be included in
32162+ * all copies or substantial portions of the Software.
32163+ *
32164+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32165+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32166+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32167+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32168+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32169+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32170+ * THE SOFTWARE.
32171+ */
32172+
32173+
32174+#ifndef _OPENGL_UTILS
32175+#define _OPENGL_UTILS
32176+
32177+typedef struct {
32178+ unsigned int *values;
32179+ int nbValues;
32180+} RangeAllocator;
32181+
32182+/*
32183+static void print_range(RangeAllocator* range)
32184+{
32185+ int i;
32186+ printf("%s", "table : ");
32187+ for(i=0;i<range->nbValues;i++)
32188+ {
32189+ printf("%d ", range->values[i]);
32190+ }
32191+ printf("\n");
32192+}
32193+*/
32194+
32195+static inline void alloc_value(RangeAllocator *range, unsigned int value)
32196+{
32197+ if (value == 0)
32198+ return;
32199+ if (range->nbValues >= 1) {
32200+ int lower = 0;
32201+ int upper = range->nbValues - 1;
32202+
32203+ while (1) {
32204+ int mid = (lower + upper) / 2;
32205+
32206+ if (range->values[mid] > value)
32207+ upper = mid;
32208+ else if (range->values[mid] < value)
32209+ lower = mid;
32210+ else
32211+ break;
32212+ if (upper - lower <= 1) {
32213+ if (value < range->values[lower]) {
32214+ range->values =
32215+ realloc(range->values,
32216+ (range->nbValues + 1) * sizeof(int));
32217+ memmove(&range->values[lower + 1], &range->values[lower],
32218+ (range->nbValues - lower) * sizeof(int));
32219+ range->values[lower] = value;
32220+ range->nbValues++;
32221+ } else if (value == range->values[lower]) {
32222+ } else if (value < range->values[upper]) {
32223+ range->values =
32224+ realloc(range->values,
32225+ (range->nbValues + 1) * sizeof(int));
32226+ memmove(&range->values[upper + 1], &range->values[upper],
32227+ (range->nbValues - upper) * sizeof(int));
32228+ range->values[upper] = value;
32229+ range->nbValues++;
32230+ } else if (value == range->values[upper]) {
32231+ } else {
32232+ upper++;
32233+
32234+ range->values =
32235+ realloc(range->values,
32236+ (range->nbValues + 1) * sizeof(int));
32237+ memmove(&range->values[upper + 1], &range->values[upper],
32238+ (range->nbValues - upper) * sizeof(int));
32239+ range->values[upper] = value;
32240+ range->nbValues++;
32241+ }
32242+ break;
32243+ }
32244+ }
32245+ } else {
32246+ range->values = malloc(sizeof(int));
32247+ range->values[0] = value;
32248+ range->nbValues = 1;
32249+ }
32250+}
32251+
32252+/* return first value */
32253+static inline unsigned int alloc_range(RangeAllocator *range, int n,
32254+ unsigned int *values)
32255+{
32256+ int i, j;
32257+
32258+ if (range->nbValues == 0) {
32259+ range->nbValues = n;
32260+ range->values = malloc(n * sizeof(int));
32261+ for (i = 0; i < n; i++) {
32262+ range->values[i] = i + 1;
32263+ if (values)
32264+ values[i] = range->values[i];
32265+ }
32266+ return 1;
32267+ } else {
32268+ int lastValue = 1;
32269+
32270+ for (i = 0; i < range->nbValues; i++) {
32271+ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
32272+ range->values =
32273+ realloc(range->values,
32274+ (range->nbValues + n) * sizeof(int));
32275+ memmove(&range->values[i + n], &range->values[i],
32276+ (range->nbValues - i) * sizeof(int));
32277+ for (j = 0; j < n; j++) {
32278+ range->values[i + j] = lastValue + 1 + j;
32279+ if (values)
32280+ values[j] = range->values[i + j];
32281+ }
32282+ range->nbValues += n;
32283+ break;
32284+ } else
32285+ lastValue = range->values[i];
32286+ }
32287+ if (i == range->nbValues) {
32288+ range->values =
32289+ realloc(range->values, (range->nbValues + n) * sizeof(int));
32290+ for (j = 0; j < n; j++) {
32291+ range->values[i + j] = lastValue + 1 + j;
32292+ if (values)
32293+ values[j] = range->values[i + j];
32294+ }
32295+ range->nbValues += n;
32296+ }
32297+ return lastValue + 1;
32298+ }
32299+}
32300+
32301+static inline void delete_value(RangeAllocator *range, unsigned int value)
32302+{
32303+ if (value == 0)
32304+ return;
32305+ if (range->nbValues >= 1) {
32306+ int lower = 0;
32307+ int upper = range->nbValues - 1;
32308+
32309+ while (1) {
32310+ int mid = (lower + upper) / 2;
32311+
32312+ if (range->values[mid] > value)
32313+ upper = mid;
32314+ else if (range->values[mid] < value)
32315+ lower = mid;
32316+ else {
32317+ lower = upper = mid;
32318+ }
32319+ if (upper - lower <= 1) {
32320+ if (value == range->values[lower]) {
32321+ memmove(&range->values[lower], &range->values[lower + 1],
32322+ (range->nbValues - lower - 1) * sizeof(int));
32323+ range->nbValues--;
32324+ } else if (value == range->values[upper]) {
32325+ memmove(&range->values[upper], &range->values[upper + 1],
32326+ (range->nbValues - upper - 1) * sizeof(int));
32327+ range->nbValues--;
32328+ }
32329+ break;
32330+ }
32331+ }
32332+ }
32333+}
32334+
32335+static inline void delete_range(RangeAllocator *range, int n,
32336+ const unsigned int *values)
32337+{
32338+ int i;
32339+
32340+ for (i = 0; i < n; i++) {
32341+ delete_value(range, values[i]);
32342+ }
32343+}
32344+
32345+static inline void delete_consecutive_values(RangeAllocator *range,
32346+ unsigned int first, int n)
32347+{
32348+ int i;
32349+
32350+ for (i = 0; i < n; i++) {
32351+ delete_value(range, first + i);
32352+ }
32353+}
32354+
32355+
32356+/*****************************************************************/
32357+/* */
32358+/* CRC LOOKUP TABLE */
32359+/* ================ */
32360+/* The following CRC lookup table was generated automagically */
32361+/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
32362+/* Program V1.0 using the following model parameters: */
32363+/* */
32364+/* Width : 4 bytes. */
32365+/* Poly : 0x04C11DB7L */
32366+/* Reverse : TRUE. */
32367+/* */
32368+/* For more information on the Rocksoft^tm Model CRC Algorithm, */
32369+/* see the document titled "A Painless Guide to CRC Error */
32370+/* Detection Algorithms" by Ross Williams */
32371+/* (ross@guest.adelaide.edu.au.). This document is likely to be */
32372+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
32373+/* */
32374+/*****************************************************************/
32375+
32376+static const unsigned int crctable[256] = {
32377+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
32378+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
32379+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
32380+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
32381+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
32382+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
32383+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
32384+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
32385+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
32386+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
32387+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
32388+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
32389+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
32390+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
32391+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
32392+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
32393+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
32394+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
32395+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
32396+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
32397+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
32398+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
32399+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
32400+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
32401+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
32402+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
32403+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
32404+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
32405+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
32406+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
32407+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
32408+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
32409+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
32410+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
32411+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
32412+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
32413+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
32414+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
32415+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
32416+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
32417+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
32418+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
32419+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
32420+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
32421+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
32422+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
32423+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
32424+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
32425+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
32426+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
32427+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
32428+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
32429+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
32430+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
32431+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
32432+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
32433+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
32434+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
32435+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
32436+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
32437+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
32438+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
32439+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
32440+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
32441+};
32442+
32443+static unsigned int calc_checksum(const void *_ptr, int length,
32444+ unsigned int seed)
32445+{
32446+ int i;
32447+ unsigned int crc = seed;
32448+ unsigned char *ptr = (unsigned char *) _ptr;
32449+
32450+ if (ptr == NULL)
32451+ return -1;
32452+ for (i = 0; i < length; i++) {
32453+ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
32454+ }
32455+ return crc;
32456+}
32457+
32458+
32459+static inline void display_gl_call(FILE *f,
32460+ int func_number, arg_t *args, int *args_size)
32461+{
32462+ int i;
32463+
32464+ if (func_number < 0) {
32465+ fprintf(f, "unknown call : %d\n", func_number);
32466+ return;
32467+ }
32468+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
32469+ int nb_args = signature->nb_args;
32470+ int *args_type = signature->args_type;
32471+
32472+ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
32473+
32474+ for (i = 0; i < nb_args; i++) {
32475+ switch (args_type[i]) {
32476+ case TYPE_UNSIGNED_CHAR:
32477+ case TYPE_CHAR:
32478+ {
32479+ fprintf(f, "%d", (char) args[i]);
32480+ break;
32481+ }
32482+
32483+ case TYPE_UNSIGNED_SHORT:
32484+ case TYPE_SHORT:
32485+ {
32486+ fprintf(f, "%d", (short) args[i]);
32487+ break;
32488+ }
32489+
32490+ case TYPE_UNSIGNED_INT:
32491+ case TYPE_INT:
32492+ {
32493+ fprintf(f, "%d", (int) args[i]);
32494+ break;
32495+ }
32496+
32497+ case TYPE_FLOAT:
32498+ fprintf(f, "%f", *(float *) &args[i]);
32499+ break;
32500+
32501+ case TYPE_DOUBLE:
32502+ CASE_IN_KNOWN_SIZE_POINTERS:
32503+ case TYPE_NULL_TERMINATED_STRING:
32504+ CASE_IN_UNKNOWN_SIZE_POINTERS:
32505+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32506+ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
32507+ fprintf(f, "\"%s\"", (char *) args[i]);
32508+ } else if (args_type[i] == TYPE_DOUBLE)
32509+ fprintf(f, "%f", *(double *) args[i]);
32510+ else if (IS_ARRAY_CHAR(args_type[i]) &&
32511+ args_size[i] <= 4 * sizeof(char)) {
32512+ int j;
32513+ int n = args_size[i] / sizeof(char);
32514+
32515+ fprintf(f, "(");
32516+ for (j = 0; j < n; j++) {
32517+ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
32518+ if (j != n - 1)
32519+ fprintf(f, ", ");
32520+ }
32521+ fprintf(f, ")");
32522+ } else if (IS_ARRAY_SHORT(args_type[i]) &&
32523+ args_size[i] <= 4 * sizeof(short)) {
32524+ int j;
32525+ int n = args_size[i] / sizeof(short);
32526+
32527+ fprintf(f, "(");
32528+ for (j = 0; j < n; j++) {
32529+ fprintf(f, "%d", ((short *) args[i])[j]);
32530+ if (j != n - 1)
32531+ fprintf(f, ", ");
32532+ }
32533+ fprintf(f, ")");
32534+ } else if (IS_ARRAY_INT(args_type[i]) &&
32535+ args_size[i] <= 4 * sizeof(int)) {
32536+ int j;
32537+ int n = args_size[i] / sizeof(int);
32538+
32539+ fprintf(f, "(");
32540+ for (j = 0; j < n; j++) {
32541+ fprintf(f, "%d", ((int *) args[i])[j]);
32542+ if (j != n - 1)
32543+ fprintf(f, ", ");
32544+ }
32545+ fprintf(f, ")");
32546+ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
32547+ args_size[i] <= 4 * sizeof(float)) {
32548+ int j;
32549+ int n = args_size[i] / sizeof(float);
32550+
32551+ fprintf(f, "(");
32552+ for (j = 0; j < n; j++) {
32553+ fprintf(f, "%f", ((float *) args[i])[j]);
32554+ if (j != n - 1)
32555+ fprintf(f, ", ");
32556+ }
32557+ fprintf(f, ")");
32558+ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
32559+ args_size[i] <= 4 * sizeof(double)) {
32560+ int j;
32561+ int n = args_size[i] / sizeof(double);
32562+
32563+ fprintf(f, "(");
32564+ for (j = 0; j < n; j++) {
32565+ fprintf(f, "%f", ((double *) args[i])[j]);
32566+ if (j != n - 1)
32567+ fprintf(f, ", ");
32568+ }
32569+ fprintf(f, ")");
32570+ } else {
32571+ fprintf(f, "%d bytes", args_size[i]);
32572+ fprintf(f, "(crc = 0x%x)",
32573+ calc_checksum((void *) args[i], args_size[i],
32574+ 0xFFFFFFFF));
32575+ }
32576+ break;
32577+
32578+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32579+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
32580+ CASE_OUT_KNOWN_SIZE_POINTERS:
32581+ {
32582+ fprintf(f, "%d bytes (OUT)", args_size[i]);
32583+ break;
32584+ }
32585+
32586+ case TYPE_IN_IGNORED_POINTER:
32587+ break;
32588+
32589+ default:
32590+ fprintf(f, "shouldn't happen : call %s arg %d\n",
32591+ tab_opengl_calls_name[func_number], i);
32592+ return;
32593+ break;
32594+ }
32595+ if (i < nb_args - 1)
32596+ fprintf(f, ", ");
32597+ }
32598+ fprintf(f, ")\n");
32599+}
32600+
32601+#endif
32602diff --git a/target-i386/parse_gl_h.c b/target-i386/parse_gl_h.c
32603new file mode 100644
32604index 0000000..f1e93ec
32605--- /dev/null
32606+++ b/target-i386/parse_gl_h.c
32607@@ -0,0 +1,1496 @@
32608+/*
32609+ * Parse gl.h et glx.h to auto-generate source code
32610+ *
32611+ * Copyright (c) 2006,2007 Even Rouault
32612+ *
32613+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32614+ * of this software and associated documentation files (the "Software"), to deal
32615+ * in the Software without restriction, including without limitation the rights
32616+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32617+ * copies of the Software, and to permit persons to whom the Software is
32618+ * furnished to do so, subject to the following conditions:
32619+ *
32620+ * The above copyright notice and this permission notice shall be included in
32621+ * all copies or substantial portions of the Software.
32622+ *
32623+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32624+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32625+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32626+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32627+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32628+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32629+ * THE SOFTWARE.
32630+ */
32631+
32632+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
32633+#include <stdio.h>
32634+#include <stdlib.h>
32635+#include <string.h>
32636+#include <assert.h>
32637+
32638+int isExtByName(const char* name)
32639+{
32640+ return (strstr(name, "ARB") != NULL) ||
32641+ (strstr(name, "IBM") != NULL) ||
32642+ (strstr(name, "EXT") != NULL) ||
32643+ (strstr(name, "ATI") != NULL) ||
32644+ (strstr(name, "NV") != NULL) ||
32645+ (strstr(name, "MESA") != NULL) ||
32646+ (strstr(name, "APPLE") != NULL) ||
32647+ (strstr(name, "SUN") != NULL) ||
32648+ (strstr(name, "SGI") != NULL);
32649+}
32650+
32651+char* get_arg_type(char* s)
32652+{
32653+ while(*s == ' ' || *s == '\t') s++;
32654+ char* n = s;
32655+ char* c = strstr(n, "const");
32656+ if (c)
32657+ n += 6;
32658+
32659+ char* t = strstr(n, " ");
32660+ if (t)
32661+ {
32662+ if (t[1] == '*')
32663+ t += 2;
32664+ t[0] = 0;
32665+ char* ori = t;
32666+ t = strstr(t+1, "[");
32667+ if (t)
32668+ {
32669+ memmove(ori, t, strlen(t));
32670+ strstr(ori, "]")[1] = 0;
32671+ }
32672+ }
32673+ return strdup(s);
32674+}
32675+
32676+typedef struct
32677+{
32678+ char* type;
32679+ char* name;
32680+ int nargs;
32681+ char** args;
32682+ int ok;
32683+ int just_for_server_side;
32684+ int has_out_parameters;
32685+ int isExt;
32686+} FuncDesc;
32687+
32688+int isExt(FuncDesc* func)
32689+{
32690+ return func->isExt;
32691+}
32692+
32693+char* get_type_string(char* type)
32694+{
32695+ if (strstr(type, "[16]"))
32696+ {
32697+ if (strstr(type, "float"))
32698+ return ("TYPE_16FLOAT");
32699+ else if (strstr(type, "double"))
32700+ return ("TYPE_16DOUBLE");
32701+ else
32702+ {
32703+ printf("inconnu %s\n", type);
32704+ exit(-1);
32705+ }
32706+ }
32707+ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
32708+ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
32709+ else if (strstr(type, "const GLvoid *"))
32710+ return "TYPE_ARRAY_VOID";
32711+ else if (strstr(type, "const GLchar *") ||
32712+ strstr(type, "const GLcharARB *"))
32713+ return "TYPE_NULL_TERMINATED_STRING";
32714+ else if (strstr(type, "const GLbyte *"))
32715+ return "TYPE_ARRAY_SIGNED_CHAR";
32716+ else if (strstr(type, "const GLubyte *"))
32717+ return "TYPE_ARRAY_UNSIGNED_CHAR";
32718+ else if (strstr(type, "const GLshort *"))
32719+ return "TYPE_ARRAY_SHORT";
32720+ else if (strstr(type, "const GLushort *") ||
32721+ strstr(type, "const GLhalfNV *"))
32722+ return "TYPE_ARRAY_UNSIGNED_SHORT";
32723+ else if (strstr(type, "const GLint *"))
32724+ return "TYPE_ARRAY_INT";
32725+ else if (strstr(type, "const GLuint *") ||
32726+ strstr(type, "const GLenum *"))
32727+ return "TYPE_ARRAY_UNSIGNED_INT";
32728+ else if (strstr(type, "const GLfloat *") ||
32729+ strstr(type, "const GLclampf *"))
32730+ return "TYPE_ARRAY_FLOAT";
32731+ else if (strstr(type, "const GLdouble *"))
32732+ return "TYPE_ARRAY_DOUBLE";
32733+ else if (strstr(type, "GLvoid *"))
32734+ return "TYPE_OUT_ARRAY_VOID";
32735+ else if (strstr(type, "GLboolean *") ||
32736+ strstr(type, "GLubyte *"))
32737+ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
32738+ else if (strstr(type, "GLcharARB *") ||
32739+ strstr(type, "GLchar *"))
32740+ return "TYPE_OUT_ARRAY_CHAR";
32741+ else if (strstr(type, "GLshort *"))
32742+ return "TYPE_OUT_ARRAY_SHORT";
32743+ else if (strstr(type, "GLushort *"))
32744+ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
32745+ else if (strstr(type, "GLint *")||
32746+ strstr(type, "GLsizei *"))
32747+ return "TYPE_OUT_ARRAY_INT";
32748+ else if (strstr(type, "GLuint *") ||
32749+ strstr(type, "GLenum *") ||
32750+ strstr(type, "GLhandleARB *"))
32751+ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
32752+ else if (strstr(type, "GLfloat *"))
32753+ return "TYPE_OUT_ARRAY_FLOAT";
32754+ else if (strstr(type, "GLdouble *"))
32755+ return "TYPE_OUT_ARRAY_DOUBLE";
32756+ else if (strcmp(type, "void") == 0)
32757+ return("TYPE_NONE");
32758+ else if (strcmp(type, "GLbyte") == 0)
32759+ return("TYPE_CHAR");
32760+ else if (strcmp(type, "GLubyte") == 0 ||
32761+ strcmp(type, "GLboolean") == 0)
32762+ return("TYPE_UNSIGNED_CHAR");
32763+ else if (strcmp(type, "GLshort") == 0)
32764+ return("TYPE_SHORT");
32765+ else if (strcmp(type, "GLushort") == 0 ||
32766+ strcmp(type, "GLhalfNV") == 0)
32767+ return("TYPE_UNSIGNED_SHORT");
32768+ else if (strcmp(type, "GLint") == 0 ||
32769+ strcmp(type, "GLsizei") == 0 ||
32770+ strcmp(type, "GLintptr") == 0 ||
32771+ strcmp(type, "GLsizeiptr") == 0 ||
32772+ strcmp(type, "GLintptrARB") == 0 ||
32773+ strcmp(type, "GLsizeiptrARB") == 0)
32774+ return("TYPE_INT");
32775+ else if (strcmp(type, "GLenum") == 0 ||
32776+ strcmp(type, "GLuint") == 0 ||
32777+ strcmp(type, "GLhandleARB") == 0 ||
32778+ strcmp(type, "GLbitfield") == 0)
32779+ return("TYPE_UNSIGNED_INT");
32780+ else if (strcmp(type, "GLfloat") == 0 ||
32781+ strcmp(type, "GLclampf") == 0)
32782+ return("TYPE_FLOAT");
32783+ else if (strcmp(type, "GLdouble") == 0 ||
32784+ strcmp(type, "GLclampd") == 0)
32785+ return("TYPE_DOUBLE");
32786+ else
32787+ {
32788+ printf("inconnu %s\n", type);
32789+ exit(-1);
32790+ }
32791+}
32792+
32793+typedef struct
32794+{
32795+ char* letter;
32796+ char* signature_type_name;
32797+ char* gl_c_type_name;
32798+ char* c_type_name;
32799+} ForIsKnownArgVector;
32800+
32801+#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
32802+#define N_FIELDS_IN_ARG_VECTOR 4
32803+
32804+
32805+typedef struct
32806+{
32807+ char* func_name;
32808+ char* signature_type_name;
32809+} KnownLastArgFunc;
32810+
32811+static KnownLastArgFunc knownLastArgFuncs[] =
32812+{
32813+{"glFogCoordfv", "TYPE_1FLOAT"},
32814+{"glFogCoorddv", "TYPE_1DOUBLE"},
32815+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
32816+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
32817+{"glFogCoordhvNV", "TYPE_1USHORT"},
32818+
32819+{"glGetFenceivNV", "TYPE_OUT_1INT"},
32820+
32821+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
32822+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
32823+
32824+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
32825+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
32826+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32827+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
32828+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32829+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
32830+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
32831+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
32832+{"glGetQueryivARB", "TYPE_OUT_1INT"},
32833+{"glGetQueryiv", "TYPE_OUT_1INT"},
32834+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
32835+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
32836+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
32837+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
32838+{"glGetProgramivARB", "TYPE_OUT_1INT"},
32839+{"glGetProgramiv", "TYPE_OUT_1INT"},
32840+{"glGetProgramivNV", "TYPE_OUT_1INT"},
32841+{"glGetShaderiv", "TYPE_OUT_1INT"},
32842+
32843+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
32844+{"glCombinerParameterivNV", "TYPE_1INT"},
32845+
32846+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32847+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
32848+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32849+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
32850+
32851+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
32852+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
32853+
32854+{"glTexBumpParameterivATI", "TYPE_1INT"},
32855+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
32856+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
32857+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
32858+
32859+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
32860+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
32861+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
32862+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
32863+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
32864+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
32865+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
32866+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
32867+
32868+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
32869+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
32870+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
32871+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
32872+
32873+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
32874+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
32875+
32876+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
32877+{"glExecuteProgramNV", "TYPE_4FLOAT"},
32878+
32879+{"glEdgeFlagv", "TYPE_1UCHAR"},
32880+
32881+{"glClipPlane", "TYPE_4DOUBLE"},
32882+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
32883+
32884+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
32885+
32886+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
32887+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
32888+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32889+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
32890+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32891+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
32892+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32893+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
32894+
32895+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
32896+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
32897+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
32898+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
32899+
32900+{"glColorTableParameterfv", "TYPE_4FLOAT"},
32901+{"glColorTableParameteriv", "TYPE_4INT"},
32902+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
32903+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
32904+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
32905+{"glColorTableParameterivEXT", "TYPE_4INT"},
32906+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
32907+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
32908+
32909+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
32910+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
32911+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
32912+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
32913+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
32914+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
32915+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
32916+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
32917+
32918+/* Not sure at all for the 2 followingo ones ! */
32919+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
32920+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
32921+
32922+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
32923+
32924+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
32925+
32926+};
32927+
32928+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
32929+{
32930+ static ForIsKnownArgVector my_tab[] =
32931+ {
32932+ { "b", "CHAR", "GLbyte", "signed char" },
32933+ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
32934+ { "s", "SHORT", "GLshort", "short" },
32935+ { "i", "INT", "GLint", "int" },
32936+ { "Integer", "INT", "GLint", "int" },
32937+ { "ub", "CHAR", "GLubyte", "unsigned char" },
32938+ { "h", "SHORT", "GLhalf", "unsigned short" },
32939+ { "us", "SHORT", "GLushort", "unsigned short" },
32940+ { "ui", "INT", "GLuint", "unsigned int" },
32941+ { "Nb", "CHAR", "GLbyte", "signed char" },
32942+ { "Ns", "SHORT", "GLshort", "short" },
32943+ { "Ni", "INT", "GLint", "int" },
32944+ { "Nub", "CHAR", "GLubyte", "unsigned char" },
32945+ { "Nus", "SHORT", "GLushort", "unsigned short" },
32946+ { "Nui", "INT", "GLuint", "unsigned int" },
32947+
32948+ { "f", "FLOAT", "GLfloat", "float" },
32949+ { "Float", "FLOAT", "GLfloat", "float" },
32950+ { "d", "DOUBLE", "GLdouble", "double" },
32951+ };
32952+
32953+ if (desc->nargs == 0)
32954+ return 0;
32955+
32956+ int i , j;
32957+
32958+ if (strstr(desc->name, "glVertexAttribs") ||
32959+ strstr(desc->name, "glProgramParameters") ||
32960+ strstr(desc->name, "glProgramEnvParameters") ||
32961+ strstr(desc->name, "glProgramLocalParameters") ||
32962+ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
32963+ return 0;
32964+
32965+ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
32966+ char signature[10];
32967+
32968+ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
32969+ {
32970+ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
32971+ {
32972+ if (p_signature_type_name)
32973+ {
32974+ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
32975+ }
32976+ if (p_c_type_name)
32977+ {
32978+ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
32979+ *p_c_type_name = "float";
32980+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
32981+ *p_c_type_name = "double";
32982+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
32983+ *p_c_type_name = "unsigned int";
32984+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
32985+ *p_c_type_name = "int";
32986+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
32987+ *p_c_type_name = "unsigned short";
32988+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
32989+ *p_c_type_name = "short";
32990+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
32991+ *p_c_type_name = "unsigned char";
32992+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
32993+ *p_c_type_name = "char";
32994+ else
32995+ assert(0);
32996+ }
32997+ return 1;
32998+ }
32999+ }
33000+
33001+ for(i=0;i<N_ELEMENTS(my_tab);i++)
33002+ {
33003+ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
33004+ {
33005+ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
33006+ sprintf(signature, "%sv", my_tab[i].letter);
33007+ else
33008+ sprintf(signature, "%d%sv", j, my_tab[i].letter);
33009+ if (strstr(desc->name, signature) &&
33010+ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
33011+ strstr(desc->args[desc->nargs - 1], "*"))
33012+ {
33013+ if (p_signature_type_name)
33014+ {
33015+ if (signatures[i][j-1][0] == 0)
33016+ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
33017+ *p_signature_type_name = signatures[i][j-1];
33018+ }
33019+ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
33020+ return 1;
33021+ }
33022+ }
33023+ }
33024+ return 0;
33025+}
33026+
33027+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
33028+{
33029+ const char* symbolic_type = get_type_string(glType);
33030+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33031+ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
33032+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33033+ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
33034+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33035+ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
33036+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33037+ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
33038+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33039+ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
33040+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33041+ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
33042+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33043+ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
33044+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33045+ fprintf(server_stub, "(const float*)(args[%d])", j);
33046+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33047+ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
33048+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33049+ fprintf(server_stub, "(const double*)(args[%d])", j);
33050+ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33051+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
33052+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
33053+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
33054+ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
33055+ fprintf(server_stub, "(const char*)(args[%d])", j);
33056+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
33057+ fprintf(server_stub, "(const short*)(args[%d])", j);
33058+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
33059+ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
33060+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
33061+ fprintf(server_stub, "(const int*)(args[%d])", j);
33062+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
33063+ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
33064+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
33065+ fprintf(server_stub, "(const float*)(args[%d])", j);
33066+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
33067+ fprintf(server_stub, "(const double*)(args[%d])", j);
33068+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
33069+ fprintf(server_stub, "(const char*)(args[%d])", j);
33070+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
33071+ fprintf(server_stub, "(const signed char*)(args[%d])", j);
33072+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
33073+ fprintf(server_stub, "(const void*)(args[%d])", j);
33074+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
33075+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
33076+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
33077+ fprintf(server_stub, "(short*)(args[%d])", j);
33078+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
33079+ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
33080+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
33081+ fprintf(server_stub, "(int*)(args[%d])", j);
33082+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
33083+ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
33084+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
33085+ fprintf(server_stub, "(float*)(args[%d])", j);
33086+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
33087+ fprintf(server_stub, "(double*)(args[%d])", j);
33088+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
33089+ fprintf(server_stub, "(void*)(args[%d])", j);
33090+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
33091+ fprintf(server_stub, "(char*)(args[%d])", j);
33092+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
33093+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
33094+
33095+ else
33096+ {
33097+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33098+ assert(0);
33099+ }
33100+}
33101+
33102+static const char* func_dealt_by_hand[500] = { NULL };
33103+
33104+
33105+static const char* ignore_func[] =
33106+{
33107+ "glGetPointerv",
33108+ "glRectdv",
33109+ "glRectfv",
33110+ "glRectiv",
33111+ "glRectsv",
33112+ "glMultiDrawArrays",
33113+ "glMultiDrawArraysEXT",
33114+ "glMultiDrawElements",
33115+ "glMultiDrawElementsEXT",
33116+ "glUnmapBuffer",
33117+ "glUnmapBufferARB",
33118+ "glLoadTransposeMatrixf",
33119+ "glLoadTransposeMatrixd",
33120+ "glMultTransposeMatrixf",
33121+ "glMultTransposeMatrixd",
33122+ "glLoadTransposeMatrixfARB",
33123+ "glLoadTransposeMatrixdARB",
33124+ "glMultTransposeMatrixfARB",
33125+ "glMultTransposeMatrixdARB",
33126+
33127+ "glPixelDataRangeNV",
33128+ "glFlushPixelDataRangeNV",
33129+ "glVertexArrayRangeNV",
33130+ "glFlushVertexArrayRangeNV",
33131+ "glVertexWeightfEXT",
33132+
33133+ "glGetBufferPointerv",
33134+ "glGetBufferPointervARB",
33135+ "glGetVertexAttribPointerv",
33136+ "glGetVertexAttribPointervARB",
33137+ "glVertexAttribPointer",
33138+ "glVertexAttribPointerARB",
33139+ "glGetVariantPointervEXT",
33140+ NULL,
33141+};
33142+
33143+void get_func_dealt_by_hand()
33144+{
33145+ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
33146+ char buffer[256];
33147+ int i = 0;
33148+ char* c;
33149+ while(fgets(buffer, 256, f))
33150+ {
33151+ if (strstr(buffer, "MAGIC_MACRO("))
33152+ {
33153+ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
33154+ * strstr(func_dealt_by_hand[i], ")") = 0;
33155+ c = strstr(func_dealt_by_hand[i], "_");
33156+ if (c && c != func_dealt_by_hand[i]) *c = 0;
33157+ i ++;
33158+ }
33159+ }
33160+ fclose(f);
33161+
33162+ int j = 0;
33163+ while(ignore_func[j])
33164+ {
33165+ func_dealt_by_hand[i] = ignore_func[j];
33166+ i++;
33167+ j++;
33168+ }
33169+}
33170+
33171+static const char* just_for_server_side_list[] =
33172+{
33173+ "glEnableClientState",
33174+ "glDisableClientState",
33175+ "glPushClientAttrib",
33176+ "glPopClientAttrib",
33177+ "glPixelStorei",
33178+ "glPixelStoref",
33179+ "glClientActiveTexture",
33180+ "glClientActiveTextureARB",
33181+ "glEnableVertexAttribArray",
33182+ "glEnableVertexAttribArrayARB",
33183+ "glDisableVertexAttribArray",
33184+ "glDisableVertexAttribArrayARB",
33185+ "glDrawElementArrayATI",
33186+ "glDrawRangeElementArrayATI",
33187+ "glGenSymbolsEXT",
33188+ "glFreeObjectBufferATI",
33189+ "glUnmapObjectBufferATI",
33190+ "glLockArraysEXT",
33191+ "glUnlockArraysEXT",
33192+ "glDepthFunc",
33193+ "glFogf",
33194+ "glFogi",
33195+ "glClipPlane",
33196+ "glGetClipPlane",
33197+
33198+/* begin of openquartz optimization */
33199+#if 1
33200+ "glMatrixMode",
33201+ "glOrtho",
33202+ "glFrustum",
33203+ "glPushMatrix",
33204+ "glPopMatrix",
33205+ "glLoadIdentity",
33206+ "glLoadMatrixd",
33207+ "glLoadMatrixf",
33208+ "glMultMatrixd",
33209+ "glMultMatrixf",
33210+ "glRotated",
33211+ "glRotatef",
33212+ "glScaled",
33213+ "glScalef",
33214+ "glTranslated",
33215+ "glTranslatef",
33216+#endif
33217+/* end of openquartz optimization */
33218+
33219+ "glGetError",
33220+ "glActiveTextureARB",
33221+
33222+ "glViewport",
33223+ "glScissor",
33224+
33225+ "glBindBufferARB",
33226+ "glDeleteBuffersARB",
33227+ "glGenBuffersARB",
33228+ "glBufferDataARB",
33229+ "glBufferSubDataARB",
33230+ "glGetBufferSubDataARB",
33231+ "glGetBufferParameterivARB",
33232+ "glBindBuffer",
33233+ "glDeleteBuffers",
33234+ "glGenBuffers",
33235+ "glBufferData",
33236+ "glBufferSubData",
33237+ "glGetBufferSubData",
33238+ "glGetBufferParameteriv",
33239+
33240+ "glPushAttrib",
33241+ "glPopAttrib",
33242+ "glEnable",
33243+ "glDisable",
33244+ "glIsEnabled",
33245+ "glBindTexture",
33246+ "glBindTextureEXT",
33247+ "glFogfv",
33248+ "glFogiv",
33249+ "glBitmap",
33250+ "glGetTexImage",
33251+ "glReadPixels",
33252+ "glDrawPixels",
33253+ "glSelectBuffer",
33254+ "glFeedbackBuffer",
33255+
33256+ "glTexImage1D",
33257+ "glTexImage2D",
33258+ "glTexImage3D",
33259+ "glTexSubImage1D",
33260+ "glTexSubImage2D",
33261+ "glTexSubImage3D",
33262+
33263+ "glTexImage3DEXT",
33264+ "glTexSubImage1DEXT",
33265+ "glTexSubImage2DEXT",
33266+ "glTexSubImage3DEXT",
33267+
33268+ "glGetCompressedTexImage",
33269+ "glCompressedTexImage1D",
33270+ "glCompressedTexImage2D",
33271+ "glCompressedTexImage3D",
33272+ "glCompressedTexSubImage1D",
33273+ "glCompressedTexSubImage2D",
33274+ "glCompressedTexSubImage3D",
33275+
33276+ "glGetCompressedTexImageARB",
33277+ "glCompressedTexImage1DARB",
33278+ "glCompressedTexImage2DARB",
33279+ "glCompressedTexImage3DARB",
33280+ "glCompressedTexSubImage1DARB",
33281+ "glCompressedTexSubImage2DARB",
33282+ "glCompressedTexSubImage3DARB",
33283+
33284+ "glCallLists",
33285+ "glNewList",
33286+ "glDeleteLists",
33287+ "glGenLists",
33288+
33289+ "glGenTextures",
33290+ "glDeleteTextures",
33291+ "glDeleteTexturesEXT",
33292+ "glMap1f",
33293+ "glMap1d",
33294+ "glMap2f",
33295+ "glMap2d",
33296+ "glGetMapdv",
33297+ "glGetMapfv",
33298+ "glGetMapiv",
33299+ "glGetBooleanv",
33300+ "glGetIntegerv",
33301+ "glGetFloatv",
33302+ "glGetDoublev",
33303+
33304+ "glGetPixelMapfv",
33305+ "glGetPixelMapuiv",
33306+ "glGetPixelMapusv",
33307+ "glGetProgramStringARB",
33308+ "glGetProgramStringNV",
33309+ "glArrayElement",
33310+ "glDrawArrays",
33311+ "glDrawElements",
33312+ "glDrawRangeElements",
33313+ "glDrawRangeElementsEXT",
33314+ "glGetProgramInfoLog",
33315+ "glGetTexLevelParameteriv",
33316+ "glGetInfoLogARB",
33317+ "glGetShaderInfoLog",
33318+ "glGetAttachedObjectsARB",
33319+ "glGetAttachedShaders",
33320+ "glGetActiveUniformARB",
33321+ "glGetActiveUniform",
33322+ "glGetUniformLocationARB",
33323+ "glGetUniformLocation",
33324+ "glGetUniformfvARB",
33325+ "glGetUniformfv",
33326+ "glGetUniformivARB",
33327+ "glGetUniformiv",
33328+ "glGetUniformuivEXT",
33329+ "glGetShaderSourceARB",
33330+ "glGetShaderSource",
33331+ "glGetActiveAttribARB",
33332+ "glGetActiveAttrib",
33333+ "glGetAttribLocationARB",
33334+ "glGetAttribLocation",
33335+
33336+ "glNewObjectBufferATI",
33337+ "glUpdateObjectBufferATI",
33338+
33339+ "glSetLocalConstantEXT",
33340+ "glSetInvariantEXT",
33341+ "glVariantbvEXT",
33342+ "glVariantsvEXT",
33343+ "glVariantivEXT",
33344+ "glVariantfvEXT",
33345+ "glVariantdvEXT",
33346+ "glVariantubvEXT",
33347+ "glVariantusvEXT",
33348+ "glVariantuivEXT",
33349+ "glGetVariantBooleanvEXT",
33350+ "glGetVariantIntegervEXT",
33351+ "glGetVariantFloatvEXT",
33352+ "glGetInvariantBooleanvEXT",
33353+ "glGetInvariantIntegervEXT",
33354+ "glGetInvariantFloatvEXT",
33355+ "glGetLocalConstantBooleanvEXT",
33356+ "glGetLocalConstantIntegervEXT",
33357+ "glGetLocalConstantFloatvEXT",
33358+
33359+ "glMatrixIndexubvARB",
33360+ "glMatrixIndexusvARB",
33361+ "glMatrixIndexuivARB",
33362+
33363+ "glColorTable",
33364+ "glColorSubTable",
33365+ "glGetColorTable",
33366+ "glConvolutionFilter1D",
33367+ "glConvolutionFilter2D",
33368+ "glGetConvolutionFilter",
33369+ "glSeparableFilter2D",
33370+ "glGetSeparableFilter",
33371+ "glGetHistogram",
33372+ "glGetMinmax",
33373+ "glColorTableEXT",
33374+ "glColorSubTableEXT",
33375+ "glGetColorTableEXT",
33376+ "glConvolutionFilter1DEXT",
33377+ "glConvolutionFilter2DEXT",
33378+ "glGetConvolutionFilterEXT",
33379+ "glSeparableFilter2DEXT",
33380+ "glGetSeparableFilterEXT",
33381+ "glGetHistogramEXT",
33382+ "glGetMinmaxEXT",
33383+
33384+ "glGetTexParameterfv",
33385+
33386+ "glGetVertexAttribivARB",
33387+ "glGetVertexAttribfvARB",
33388+ "glGetVertexAttribdvARB",
33389+ "glGetVertexAttribiv",
33390+ "glGetVertexAttribfv",
33391+ "glGetVertexAttribdv",
33392+
33393+ "glGetDetailTexFuncSGIS",
33394+ "glGetSharpenTexFuncSGIS",
33395+
33396+ "fake_gluBuild2DMipmaps",
33397+
33398+ "glRenderMode",
33399+
33400+ "glEnableVariantClientStateEXT",
33401+ "glDisableVariantClientStateEXT",
33402+
33403+ "glGetActiveVaryingNV",
33404+
33405+ NULL,
33406+};
33407+
33408+static int just_for_server_side_func(char* funcname)
33409+{
33410+ int i;
33411+ for(i=0;just_for_server_side_list[i];i++)
33412+ {
33413+ if (strcmp(just_for_server_side_list[i], funcname) == 0)
33414+ return 1;
33415+ }
33416+ return 0;
33417+}
33418+
33419+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
33420+{
33421+ char buffer[256];
33422+ while(fgets(buffer, 256, f))
33423+ {
33424+
33425+ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
33426+ {
33427+ int i = 0;
33428+ int skip = 0;
33429+ if (func_dealt_by_hand[0] == 0)
33430+ {
33431+ get_func_dealt_by_hand();
33432+ }
33433+ while (func_dealt_by_hand[i])
33434+ {
33435+ if (strstr(buffer, func_dealt_by_hand[i]))
33436+ {
33437+ skip = 1;
33438+ break;
33439+ }
33440+ i++;
33441+ }
33442+ if (skip)
33443+ continue;
33444+
33445+ char** args = malloc(15 * sizeof(char*));
33446+ int narg = 0;
33447+ char* type = buffer + 6;
33448+ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
33449+ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
33450+ n[-1] = 0;
33451+ type = strdup(type);
33452+ n += skip_length;
33453+ char* fonc = n;
33454+ n = strstr(n, "(");
33455+ if (n[-1] == ' ') n[-1] = 0;
33456+ n[0] = 0;
33457+ fonc = strdup(fonc);
33458+ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
33459+ {
33460+ }
33461+ else*/
33462+
33463+
33464+ if (ignoreEXT == 1 && isExtByName(fonc))
33465+ {
33466+ free(type);
33467+ free(fonc);
33468+ continue;
33469+ }
33470+ n++;
33471+ while(1)
33472+ {
33473+ char* virg = strstr(n, ",");
33474+ if (virg)
33475+ {
33476+ args[narg] = n;
33477+ virg[0] = 0;
33478+ args[narg] = get_arg_type(args[narg]);
33479+ narg++;
33480+ n = virg+1;
33481+ }
33482+ else
33483+ break;
33484+ }
33485+ while (strstr(n, ")") == 0)
33486+ {
33487+ fgets(buffer, 256, f);
33488+ n = buffer;
33489+ while(1)
33490+ {
33491+ char* virg = strstr(n, ",");
33492+ if (virg)
33493+ {
33494+ args[narg] = n;
33495+ virg[0] = 0;
33496+ args[narg] = get_arg_type(args[narg]);
33497+ narg++;
33498+ n = virg+1;
33499+ }
33500+ else
33501+ break;
33502+ }
33503+ }
33504+ char* par = strstr(n, ")");
33505+ args[narg] = n;
33506+ par[0] = 0;
33507+ args[narg] = get_arg_type(args[narg]);
33508+ narg++;
33509+
33510+
33511+ /*printf("%s %s (", type, fonc);
33512+ for(i=0;i<narg;i++)
33513+ {
33514+ printf("%s,", args[i]);
33515+ }
33516+ printf(")\n");*/
33517+
33518+ for(i=0;i<funcDescCount;i++)
33519+ {
33520+ if (strcmp(funcDesc[i].name, fonc) == 0)
33521+ {
33522+ if (ignoreEXT == 0)
33523+ funcDesc[i].isExt = 1;
33524+ break;
33525+ }
33526+ }
33527+ if (i == funcDescCount)
33528+ {
33529+ funcDesc[funcDescCount].type = type;
33530+ funcDesc[funcDescCount].name = fonc;
33531+ funcDesc[funcDescCount].nargs = narg;
33532+ funcDesc[funcDescCount].args = args;
33533+ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
33534+ funcDescCount++;
33535+ }
33536+ else
33537+ {
33538+ free(fonc);
33539+ free(args);
33540+ free(type);
33541+ }
33542+ /*
33543+ for(i=0;i<narg;i++)
33544+ {
33545+ free(args[i]);
33546+ }
33547+ free(fonc);
33548+ free(type);*/
33549+ }
33550+ }
33551+ return funcDescCount;
33552+}
33553+
33554+typedef struct
33555+{
33556+ char* str;
33557+ int i;
33558+} StringIntStruct;
33559+
33560+StringIntStruct argDependingOnPreviousArgTab[] =
33561+{
33562+ { "glLoadProgramNV", 3},
33563+ { "ProgramNamedParameter", 2},
33564+ { "glDeleteBuffers", 1},
33565+ { "glDrawBuffers", 1},
33566+ { "glGenPrograms", 1},
33567+ { "glDeletePrograms", 1},
33568+ { "glGenQueries", 1},
33569+ { "glDeleteQueries", 1},
33570+ { "glGenFencesNV", 1},
33571+ { "glDeleteFencesNV", 1},
33572+ { "glGenOcclusionQueriesNV", 1},
33573+ { "glDeleteOcclusionQueriesNV", 1},
33574+ { "glRequestResidentProgramsNV", 1},
33575+ { "glDeleteTextures", 1},
33576+ { "glGenFramebuffersEXT", 1},
33577+ { "glDeleteFramebuffersEXT", 1},
33578+ { "glGenRenderbuffersEXT", 1},
33579+ { "glDeleteRenderbuffersEXT", 1},
33580+ { "glUniform1fv", 2},
33581+ { "glUniform2fv", 2},
33582+ { "glUniform3fv", 2},
33583+ { "glUniform4fv", 2},
33584+ { "glUniform1iv", 2},
33585+ { "glUniform2iv", 2},
33586+ { "glUniform3iv", 2},
33587+ { "glUniform4iv", 2},
33588+ { "glUniform1uivEXT", 2},
33589+ { "glUniform2uivEXT", 2},
33590+ { "glUniform3uivEXT", 2},
33591+ { "glUniform4uivEXT", 2},
33592+ { "glProgramParameters4fvNV", 3},
33593+ { "glProgramParameters4dvNV", 3},
33594+ { "glProgramLocalParameters4fvEXT", 3},
33595+ { "glProgramLocalParametersI4ivNV", 3},
33596+ { "glProgramLocalParametersI4uivNV", 3},
33597+ { "glProgramEnvParameters4fvEXT", 3},
33598+ { "glProgramEnvParametersI4ivNV", 3},
33599+ { "glProgramEnvParametersI4uivNV", 3},
33600+ { "glAreProgramsResidentNV", 1} ,
33601+ { "glAreProgramsResidentNV", 2} ,
33602+ { "glAreTexturesResident", 1} ,
33603+ { "glAreTexturesResident", 2} ,
33604+ { "glPrioritizeTextures", 1} ,
33605+ { "glPrioritizeTextures", 2} ,
33606+ { "glProgramStringARB", 3} ,
33607+
33608+ { "glVertexAttribs", 2},
33609+
33610+ { "glUniformMatrix", 3 },
33611+
33612+ { "glGetVertexAttribfv", 2},
33613+ { "glGetVertexAttribiv", 2},
33614+ { "glGetVertexAttribdv", 2},
33615+ { "glGetVertexAttribIivEXT", 2},
33616+ { "glGetVertexAttribIuivEXT", 2},
33617+
33618+ { "glPointParameterfv", 1},
33619+ { "glPointParameteriv", 1},
33620+
33621+ { "glWeightbvARB", 1},
33622+ { "glWeightsvARB", 1},
33623+ { "glWeightivARB", 1},
33624+ { "glWeightfvARB", 1},
33625+ { "glWeightdvARB", 1},
33626+ { "glWeightubvARB", 1},
33627+ { "glWeightusvARB", 1},
33628+ { "glWeightuivARB", 1},
33629+
33630+ { "glTexEnvfv", 2},
33631+ { "glTexEnviv", 2},
33632+ { "glGetTexEnvfv", 2},
33633+ { "glGetTexEnviv", 2},
33634+ { "glTexGendv", 2},
33635+ { "glTexGenfv", 2},
33636+ { "glTexGeniv", 2},
33637+ { "glGetTexGendv", 2},
33638+ { "glGetTexGenfv", 2},
33639+ { "glGetTexGeniv", 2},
33640+
33641+ { "glLightfv", 2},
33642+ { "glLightiv", 2},
33643+ { "glGetLightfv", 2},
33644+ { "glGetLightiv", 2},
33645+ { "glFragmentLightfvSGIX", 2},
33646+ { "glFragmentLightivSGIX", 2},
33647+ { "glGetFragmentLightfvSGIX", 2},
33648+ { "glGetFragmentLightivSGIX", 2},
33649+
33650+
33651+ { "glLightModelfv", 1},
33652+ { "glLightModeliv", 1},
33653+ { "glFragmentLightModelfvSGIX", 1},
33654+ { "glFragmentLightModelivSGIX", 1},
33655+
33656+ { "glMaterialfv", 2},
33657+ { "glMaterialiv", 2},
33658+ { "glGetMaterialfv", 2},
33659+ { "glGetMaterialiv", 2},
33660+ { "glFragmentMaterialfvSGIX", 2},
33661+ { "glFragmentMaterialivSGIX", 2},
33662+ { "glGetFragmentMaterialfvSGIX", 2},
33663+ { "glGetFragmentMaterialivSGIX", 2},
33664+
33665+ { "glFogiv", 1},
33666+ { "glFogfv", 1},
33667+
33668+ { "glTexParameterfv", 2},
33669+ { "glTexParameteriv", 2},
33670+ { "glGetTexParameterfv", 2},
33671+ { "glGetTexParameteriv", 2},
33672+
33673+ { "glTexParameterIivEXT", 2},
33674+ { "glTexParameterIuivEXT", 2},
33675+ { "glGetTexParameterIivEXT", 2},
33676+ { "glGetTexParameterIuivEXT", 2},
33677+
33678+ { "glPixelMapfv", 2},
33679+ { "glPixelMapuiv", 2},
33680+ { "glPixelMapusv", 2},
33681+
33682+ { "glDetailTexFuncSGIS", 2 },
33683+ { "glSharpenTexFuncSGIS", 2 },
33684+
33685+ { "glSpriteParameterfvSGIX", 1 },
33686+ { "glSpriteParameterivSGIX", 1 },
33687+
33688+ { "ConvolutionParameter", 2},
33689+
33690+ { "glProgramBufferParametersfvNV", 4},
33691+ { "glProgramBufferParametersIivNV", 4},
33692+ { "glProgramBufferParametersIuivNV", 4},
33693+
33694+ { "glTransformFeedbackAttribsNV", 1},
33695+ { "glTransformFeedbackVaryingsNV", 2},
33696+};
33697+
33698+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
33699+{
33700+ int i;
33701+ if (strstr(funcDesc->args[j], "*") == NULL)
33702+ return 0;
33703+ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
33704+ {
33705+ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
33706+ return 1;
33707+ }
33708+ return 0;
33709+}
33710+
33711+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
33712+{
33713+ int j;
33714+ for(j=0;j<funcDesc->nargs;j++)
33715+ {
33716+ if (j != 0) fprintf(f,", ");
33717+ if (strstr(funcDesc->args[j], "[16]"))
33718+ {
33719+ if (strstr(funcDesc->args[j], "float"))
33720+ {
33721+ fprintf(f, "const GLfloat arg_%d[16]", j);
33722+ }
33723+ else if (strstr(funcDesc->args[j], "double"))
33724+ {
33725+ fprintf(f, "const GLdouble arg_%d[16]", j);
33726+ }
33727+ else
33728+ {
33729+ exit(-1);
33730+ }
33731+ }
33732+ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
33733+ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
33734+ else
33735+ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
33736+ }
33737+}
33738+
33739+int main(int argc, char* argv[])
33740+{
33741+ FuncDesc funcDesc[3000];
33742+ int funcDescCount = 0;
33743+ FILE* f;
33744+
33745+ f = fopen("../target-i386/mesa_gl.h", "r");
33746+ assert(f);
33747+ /*if (!f)
33748+ f = fopen("/usr/include/GL/gl.h", "r");*/
33749+ funcDescCount = parse(f, funcDesc, 0, 1);
33750+ fclose(f);
33751+
33752+ f = fopen("../target-i386/mesa_glext.h", "r");
33753+ assert(f);
33754+ /*if (!f)
33755+ f = fopen("/usr/include/GL/glext.h", "r");*/
33756+ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
33757+ fclose(f);
33758+
33759+ FILE* header = fopen("gl_func.h", "w");
33760+ FILE* client_stub = fopen("client_stub.c", "w");
33761+ FILE* server_stub = fopen("server_stub.c", "w");
33762+
33763+ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33764+ fprintf(header, "#define COMPOSE(x,y) x##y\n");
33765+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
33766+ fprintf(header, "enum {\n"
33767+ "#include \"gl_func_perso.h\"\n");
33768+
33769+ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33770+
33771+ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33772+
33773+ int i;
33774+ for(i=0;i<funcDescCount;i++)
33775+ {
33776+ funcDesc[i].ok = 0;
33777+ char* name = funcDesc[i].name;
33778+ char* type = funcDesc[i].type;
33779+ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
33780+ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
33781+ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
33782+ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
33783+ {
33784+ int pointer_of_unknown_size = 0;
33785+ int j;
33786+
33787+ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
33788+ {
33789+ funcDesc[i].nargs = 0;
33790+ }
33791+ for(j=0;j<funcDesc[i].nargs-1;j++)
33792+ {
33793+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33794+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33795+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33796+ {
33797+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33798+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33799+ }
33800+ }
33801+
33802+ if (pointer_of_unknown_size == 0)
33803+ {
33804+ char* signature_type_name;
33805+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33806+ {
33807+ if (strstr(signature_type_name, "TYPE_OUT"))
33808+ funcDesc[i].has_out_parameters = 1;
33809+ }
33810+ else
33811+ {
33812+ if (funcDesc[i].nargs-1 >= 0)
33813+ {
33814+ j = funcDesc[i].nargs-1;
33815+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33816+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33817+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33818+ {
33819+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33820+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33821+ }
33822+ }
33823+ }
33824+ }
33825+ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
33826+ {
33827+ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
33828+ {
33829+ free(funcDesc[i].args[0]);
33830+ if (strstr(funcDesc[i].name, "Matrixf"))
33831+ funcDesc[i].args[0] = strdup("GLfloat m[16]");
33832+ else
33833+ funcDesc[i].args[0] = strdup("GLdouble m[16]");
33834+ pointer_of_unknown_size = 0;
33835+ }
33836+ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
33837+ {
33838+ free(funcDesc[i].args[0]);
33839+ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
33840+ pointer_of_unknown_size = 0;
33841+ }
33842+ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
33843+ {
33844+ free(funcDesc[i].args[0]);
33845+ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
33846+ funcDesc[i].has_out_parameters = 1;
33847+ pointer_of_unknown_size = 0;
33848+ }
33849+ }
33850+ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
33851+ {
33852+ fprintf(header, " %s_func,\n", funcDesc[i].name);
33853+ funcDesc[i].ok = 1;
33854+ if (just_for_server_side_func(name))
33855+ funcDesc[i].just_for_server_side = 1;
33856+ for(j=0;j<funcDesc[i].nargs;j++)
33857+ {
33858+ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
33859+ funcDesc[i].has_out_parameters = 1;
33860+ }
33861+ }
33862+ else
33863+ {
33864+ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
33865+ }
33866+ }
33867+ }
33868+
33869+ fprintf(header, " GL_N_CALLS\n};\n");
33870+
33871+
33872+ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
33873+ fprintf(server_stub, "{\n");
33874+ fprintf(server_stub, " switch(func_number)\n");
33875+ fprintf(server_stub, " {\n");
33876+
33877+
33878+ for(i=0;i<funcDescCount;i++)
33879+ {
33880+ if (funcDesc[i].ok)
33881+ {
33882+ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
33883+ funcDesc[i].name,
33884+ get_type_string(funcDesc[i].type),
33885+ funcDesc[i].has_out_parameters);
33886+ fprintf(header, "%d", funcDesc[i].nargs);
33887+ int j;
33888+ char* signature_type_name;
33889+ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
33890+
33891+ for(j=0;j<n_args_to_check;j++)
33892+ {
33893+ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
33894+ {
33895+ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
33896+ }
33897+ else
33898+ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
33899+ }
33900+
33901+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33902+ {
33903+ fprintf(header, ", %s", signature_type_name);
33904+ }
33905+ fprintf(header, "};\n");
33906+
33907+
33908+ if (funcDesc[i].just_for_server_side == 0)
33909+ {
33910+ if (isExt(&funcDesc[i]))
33911+ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
33912+ else
33913+ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
33914+ fprintf_prototype_args(client_stub, &funcDesc[i]);
33915+ fprintf(client_stub, ")\n");
33916+ fprintf(client_stub, "{\n");
33917+ if (strcmp(funcDesc[i].type, "void") != 0)
33918+ {
33919+ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
33920+ if (isExt(&funcDesc[i]))
33921+ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
33922+ }
33923+ else
33924+ {
33925+ if (isExt(&funcDesc[i]))
33926+ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
33927+ }
33928+
33929+ /*
33930+ fprintf(client_stub, " do_opengl_call(%s_func, %s",
33931+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
33932+ for(j=0;j<funcDesc[i].nargs;j++)
33933+ {
33934+ fprintf(client_stub, ", arg_%d", j);
33935+ }
33936+ fprintf(client_stub, ");\n");
33937+ */
33938+
33939+ if (funcDesc[i].nargs)
33940+ {
33941+ fprintf(client_stub, " long args[] = { ");
33942+ for(j=0;j<funcDesc[i].nargs;j++)
33943+ {
33944+ if (j > 0) fprintf(client_stub, ", ");
33945+ if (strstr(funcDesc[i].args[j], "*"))
33946+ {
33947+ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
33948+ }
33949+ else
33950+ {
33951+ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
33952+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33953+ fprintf(client_stub, "CHAR_TO_ARG");
33954+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33955+ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
33956+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33957+ fprintf(client_stub, "SHORT_TO_ARG");
33958+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33959+ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
33960+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33961+ fprintf(client_stub, "INT_TO_ARG");
33962+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33963+ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
33964+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33965+ fprintf(client_stub, "FLOAT_TO_ARG");
33966+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33967+ fprintf(client_stub, "POINTER_TO_ARG");
33968+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33969+ fprintf(client_stub, "DOUBLE_TO_ARG");
33970+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33971+ fprintf(client_stub, "POINTER_TO_ARG");
33972+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33973+ fprintf(client_stub, "POINTER_TO_ARG");
33974+ else
33975+ {
33976+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33977+ assert(0);
33978+ }
33979+ fprintf(client_stub, "(arg_%d)", j);
33980+ }
33981+ }
33982+ fprintf(client_stub, "};\n");
33983+ }
33984+
33985+ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
33986+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
33987+ (funcDesc[i].nargs) ? "args" : "NULL");
33988+
33989+ if (strcmp(funcDesc[i].type, "void") != 0)
33990+ {
33991+ fprintf(client_stub, " return ret;\n");
33992+ }
33993+ fprintf(client_stub, "}\n\n");
33994+ }
33995+
33996+ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
33997+ fprintf(server_stub, " {\n");
33998+
33999+ if (isExt(&funcDesc[i]))
34000+ {
34001+ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
34002+ fprintf_prototype_args(server_stub, &funcDesc[i]);
34003+ fprintf(server_stub, "));\n");
34004+ }
34005+
34006+ fprintf(server_stub, " ");
34007+
34008+ if (strcmp(funcDesc[i].type, "void") == 0)
34009+ ;
34010+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
34011+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
34012+ fprintf(server_stub, "*pret_int = ");
34013+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
34014+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
34015+ fprintf(server_stub, "*pret_char = ");
34016+ else
34017+ {
34018+ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
34019+ exit(-1);
34020+ }
34021+ /*if (strstr(funcDesc[i].name, "EXT"))
34022+ {
34023+ char* dup = strdup(funcDesc[i].name);
34024+ *strstr(dup, "EXT") = 0;
34025+ fprintf(server_stub, "%s(", dup);
34026+ free(dup);
34027+ }
34028+ else*/
34029+ {
34030+ if (isExt(&funcDesc[i]))
34031+ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
34032+ else
34033+ fprintf(server_stub, "%s(", funcDesc[i].name);
34034+ }
34035+ char* c_type_name;
34036+ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
34037+ {
34038+ for(j=0;j<funcDesc[i].nargs - 1;j++)
34039+ {
34040+ if (j != 0) fprintf(server_stub,", ");
34041+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
34042+ }
34043+ if (j != 0) fprintf(server_stub,", ");
34044+ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
34045+ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
34046+ else
34047+ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
34048+ }
34049+ else
34050+ {
34051+ for(j=0;j<funcDesc[i].nargs;j++)
34052+ {
34053+ if (j != 0) fprintf(server_stub,", ");
34054+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
34055+ }
34056+ }
34057+ fprintf(server_stub, ");\n");
34058+
34059+ fprintf(server_stub, " break;\n");
34060+ fprintf(server_stub, " }\n");
34061+ }
34062+ }
34063+
34064+ fprintf(server_stub, " default:\n");
34065+ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
34066+ fprintf(server_stub, " break;\n");
34067+ fprintf(server_stub, " }\n");
34068+ fprintf(server_stub, "}\n");
34069+
34070+ fprintf(header, "#undef MAGIC_MACRO\n");
34071+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
34072+ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
34073+ fprintf(header, "{\n");
34074+ fprintf(header, "#include \"gl_func_perso.h\"\n");
34075+ for(i=0;i<funcDescCount;i++)
34076+ {
34077+ if (funcDesc[i].ok)
34078+ {
34079+ fprintf(header, " %s_signature,\n", funcDesc[i].name);
34080+ }
34081+ }
34082+ fprintf(header, "};\n\n");
34083+
34084+ fprintf(header, "#undef MAGIC_MACRO\n");
34085+ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
34086+ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
34087+ fprintf(header, "{\n");
34088+ fprintf(header, "#include \"gl_func_perso.h\"\n");
34089+ for(i=0;i<funcDescCount;i++)
34090+ {
34091+ if (funcDesc[i].ok)
34092+ {
34093+ fprintf(header, " \"%s\",\n", funcDesc[i].name);
34094+ }
34095+ }
34096+ fprintf(header, "};\n\n");
34097+
34098+ fclose(header);
34099+ fclose(server_stub);
34100+ fclose(client_stub);
34101+
34102+ return 0;
34103+}
34104diff --git a/target-i386/parse_mesa_get_c.c b/target-i386/parse_mesa_get_c.c
34105new file mode 100644
34106index 0000000..b214358
34107--- /dev/null
34108+++ b/target-i386/parse_mesa_get_c.c
34109@@ -0,0 +1,225 @@
34110+/*
34111+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
34112+ *
34113+ * Copyright (c) 2007 Even Rouault
34114+ *
34115+ * Permission is hereby granted, free of charge, to any person obtaining a copy
34116+ * of this software and associated documentation files (the "Software"), to deal
34117+ * in the Software without restriction, including without limitation the rights
34118+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34119+ * copies of the Software, and to permit persons to whom the Software is
34120+ * furnished to do so, subject to the following conditions:
34121+ *
34122+ * The above copyright notice and this permission notice shall be included in
34123+ * all copies or substantial portions of the Software.
34124+ *
34125+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34126+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34127+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
34128+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34129+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34130+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
34131+ * THE SOFTWARE.
34132+ */
34133+
34134+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
34135+
34136+#include <stdlib.h>
34137+#include <stdio.h>
34138+#include <string.h>
34139+#include <assert.h>
34140+
34141+#include "mesa_gl.h"
34142+#include "mesa_glext.h"
34143+
34144+/* #include "mesa_enums.c" */
34145+
34146+int gl_lookup_enum_by_name(const char* name)
34147+{
34148+ FILE* f;
34149+ char buffer[256];
34150+ char template1[256];
34151+ char template2[256];
34152+ int i;
34153+ sprintf(template1, "#define %s\t", name);
34154+ sprintf(template2, "#define %s ", name);
34155+ for(i=0;i<2;i++)
34156+ {
34157+ if (i == 0)
34158+ f = fopen("mesa_gl.h", "r");
34159+ else
34160+ f = fopen("mesa_glext.h", "r");
34161+ while(fgets(buffer, 256, f))
34162+ {
34163+ if (strstr(buffer, template1) || strstr(buffer, template2))
34164+ {
34165+ char* c = strstr(buffer, "0x");
34166+ assert(c);
34167+ int ret;
34168+ ret = strtol(c, NULL, 16);
34169+ return ret;
34170+ }
34171+ }
34172+ fclose(f);
34173+ }
34174+
34175+ return -1;
34176+}
34177+
34178+typedef struct
34179+{
34180+ int value;
34181+ char* name;
34182+ int nb_elts;
34183+} Token;
34184+
34185+int compare_func(Token* a, Token* b)
34186+{
34187+ return a->value - b->value;
34188+}
34189+
34190+typedef struct
34191+{
34192+ int i;
34193+ char* str;
34194+} Cpl;
34195+#define CPL(x) {x, #x}
34196+
34197+Cpl constantsOneVal[] =
34198+{
34199+ CPL(GL_MAX_GENERAL_COMBINERS_NV),
34200+ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
34201+ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
34202+ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
34203+ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34204+ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
34205+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
34206+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
34207+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
34208+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34209+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34210+};
34211+#define NB_CONSTANTS_ONE_VAL 11
34212+
34213+int main(int argc, char* argv[])
34214+{
34215+ FILE* f = fopen("mesa_get.c", "r");
34216+ char buffer[256];
34217+ int state = 0;
34218+ char name[256];
34219+ int count = 0;
34220+ char template[256];
34221+ Token tokens[1000];
34222+ int ntoken = 0;
34223+ int i;
34224+ FILE* outf = fopen("glgetv_cst.h", "w");
34225+
34226+ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
34227+ fprintf(outf, "typedef struct {\n");
34228+ fprintf(outf, " GLuint count;\n");
34229+ fprintf(outf, " GLenum token;\n");
34230+ fprintf(outf, " const char *name;\n");
34231+ fprintf(outf, "} GlGetConstant ;\n");
34232+ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
34233+
34234+ while(fgets(buffer, 256, f))
34235+ {
34236+ if (strstr(buffer, "_mesa_GetBooleanv"))
34237+ {
34238+ state = 1;
34239+ }
34240+ else if (state == 1)
34241+ {
34242+ if (strstr(buffer, "_mesa_GetFloatv"))
34243+ {
34244+ break;
34245+ }
34246+ else if (strstr(buffer, "case GL_"))
34247+ {
34248+ strcpy(name, strstr(buffer, "case GL_") + 5);
34249+ *strstr(name, ":") = 0;
34250+ count = 0;
34251+ strcpy(template, "params[0]");
34252+ }
34253+ else if (strstr(buffer, template))
34254+ {
34255+ count ++;
34256+ sprintf(template, "params[%d]", count);
34257+ }
34258+ else if (strstr(buffer, "break"))
34259+ {
34260+ if (count > 0)
34261+ {
34262+ int gl_lookup = gl_lookup_enum_by_name(name);
34263+ /*
34264+ int mesa_lookup = _mesa_lookup_enum_by_name(name);
34265+ if (mesa_lookup != -1)
34266+ {
34267+ if(mesa_lookup != gl_lookup)
34268+ {
34269+ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
34270+ exit(-1);
34271+ }
34272+ }*/
34273+ if (gl_lookup == -1)
34274+ {
34275+ fprintf(stderr, "not found in includes : %s\n", name);
34276+ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
34277+ }
34278+ else
34279+ {
34280+ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
34281+ tokens[ntoken].value = gl_lookup;
34282+ tokens[ntoken].nb_elts = count;
34283+ tokens[ntoken].name = strdup(name);
34284+ ntoken++;
34285+ }
34286+ /*fprintf(outf, "#ifdef %s\n", name);
34287+ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
34288+ fprintf(outf, "#endif\n");*/
34289+ }
34290+ else
34291+ fprintf(stderr, "not recognized : %s\n", name);
34292+ }
34293+ }
34294+ }
34295+
34296+ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
34297+ {
34298+ tokens[ntoken].value = constantsOneVal[i].i;
34299+ tokens[ntoken].nb_elts = 1;
34300+ tokens[ntoken].name = strdup(constantsOneVal[i].str);
34301+ ntoken++;
34302+ }
34303+
34304+ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
34305+ tokens[ntoken].nb_elts = 1;
34306+ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
34307+ ntoken++;
34308+
34309+ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
34310+ tokens[ntoken].nb_elts = 3;
34311+ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
34312+ ntoken++;
34313+
34314+ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
34315+ tokens[ntoken].nb_elts = 3;
34316+ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
34317+ ntoken++;
34318+
34319+ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
34320+ tokens[ntoken].nb_elts = 4;
34321+ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
34322+ ntoken++;
34323+
34324+
34325+ qsort(tokens, ntoken, sizeof(Token), compare_func);
34326+ for(i=0;i<ntoken;i++)
34327+ {
34328+ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
34329+ }
34330+ fprintf(outf, "};\n");
34331+ fclose(f);
34332+ fclose(outf);
34333+ return 0;
34334+}
34335diff --git a/target-i386/translate.c b/target-i386/translate.c
34336index 4b894fd..10920a7 100644
34337--- a/target-i386/translate.c
34338+++ b/target-i386/translate.c
34339@@ -741,6 +741,8 @@ static void gen_check_io(DisasContext *s, int ot, target_ulong cur_eip,
34340 int state_saved;
34341 target_ulong next_eip;
34342
34343+ return;
34344+
34345 state_saved = 0;
34346 if (s->pe && (s->cpl > s->iopl || s->vm86)) {
34347 if (s->cc_op != CC_OP_DYNAMIC)
34348@@ -2592,11 +2594,18 @@ static void gen_exception(DisasContext *s, int trapno, target_ulong cur_eip)
34349 s->is_jmp = 3;
34350 }
34351
34352+int enable_gl = 0;
34353+
34354 /* an interrupt is different from an exception because of the
34355 privilege checks */
34356 static void gen_interrupt(DisasContext *s, int intno,
34357 target_ulong cur_eip, target_ulong next_eip)
34358 {
34359+ if (enable_gl && intno == 0x99) {
34360+ gen_helper_opengl();
34361+ return;
34362+ }
34363+
34364 if (s->cc_op != CC_OP_DYNAMIC)
34365 gen_op_set_cc_op(s->cc_op);
34366 gen_jmp_im(cur_eip);
34367diff --git a/vl.c b/vl.c
34368index 56623fb..095da54 100644
34369--- a/vl.c
34370+++ b/vl.c
34371@@ -245,6 +245,7 @@ int semihosting_enabled = 0;
34372 #ifdef TARGET_ARM
34373 int old_param = 0;
34374 #endif
34375+int force_pointer = 0;
34376 const char *qemu_name;
34377 int alt_grab = 0;
34378 #if defined(TARGET_SPARC) || defined(TARGET_PPC)
34379@@ -253,6 +254,7 @@ const char *prom_envs[MAX_PROM_ENVS];
34380 #endif
34381 int nb_drives_opt;
34382 struct drive_opt drives_opt[MAX_DRIVES];
34383+extern int enable_gl;
34384
34385 static CPUState *cur_cpu;
34386 static CPUState *next_cpu;
34387@@ -4208,12 +4210,14 @@ enum {
34388 QEMU_OPTION_clock,
34389 QEMU_OPTION_localtime,
34390 QEMU_OPTION_startdate,
34391+ QEMU_OPTION_enable_gl,
34392 QEMU_OPTION_icount,
34393 QEMU_OPTION_echr,
34394 QEMU_OPTION_virtiocon,
34395 QEMU_OPTION_show_cursor,
34396 QEMU_OPTION_semihosting,
34397 QEMU_OPTION_old_param,
34398+ QEMU_OPTION_force_pointer,
34399 QEMU_OPTION_tb_size,
34400 QEMU_OPTION_incoming,
34401 QEMU_OPTION_chroot,
34402@@ -4344,6 +4348,8 @@ static const QEMUOption qemu_options[] = {
34403 #if defined(TARGET_ARM)
34404 { "old-param", 0, QEMU_OPTION_old_param },
34405 #endif
34406+ { "force-pointer", 0, QEMU_OPTION_force_pointer },
34407+ { "enable-gl", 0, QEMU_OPTION_enable_gl },
34408 { "tb-size", HAS_ARG, QEMU_OPTION_tb_size },
34409 { "incoming", HAS_ARG, QEMU_OPTION_incoming },
34410 { "chroot", HAS_ARG, QEMU_OPTION_chroot },
34411@@ -4496,22 +4502,17 @@ static void select_vgahw (const char *p)
34412 {
34413 const char *opts;
34414
34415+ std_vga_enabled = 0;
34416+ cirrus_vga_enabled = 0;
34417+ vmsvga_enabled = 0;
34418+
34419 if (strstart(p, "std", &opts)) {
34420 std_vga_enabled = 1;
34421- cirrus_vga_enabled = 0;
34422- vmsvga_enabled = 0;
34423 } else if (strstart(p, "cirrus", &opts)) {
34424 cirrus_vga_enabled = 1;
34425- std_vga_enabled = 0;
34426- vmsvga_enabled = 0;
34427 } else if (strstart(p, "vmware", &opts)) {
34428- cirrus_vga_enabled = 0;
34429- std_vga_enabled = 0;
34430 vmsvga_enabled = 1;
34431 } else if (strstart(p, "none", &opts)) {
34432- cirrus_vga_enabled = 0;
34433- std_vga_enabled = 0;
34434- vmsvga_enabled = 0;
34435 } else {
34436 invalid_vga:
34437 fprintf(stderr, "Unknown vga type: %s\n", p);
34438@@ -5220,6 +5221,9 @@ int main(int argc, char **argv, char **envp)
34439 old_param = 1;
34440 break;
34441 #endif
34442+ case QEMU_OPTION_force_pointer:
34443+ force_pointer = 1;
34444+ break;
34445 case QEMU_OPTION_clock:
34446 configure_alarms(optarg);
34447 break;
34448@@ -5261,6 +5265,11 @@ int main(int argc, char **argv, char **envp)
34449 }
34450 }
34451 break;
34452+#ifdef TARGET_OPENGL_OK
34453+ case QEMU_OPTION_enable_gl:
34454+ enable_gl = 1;
34455+ break;
34456+#endif
34457 case QEMU_OPTION_tb_size:
34458 tb_size = strtol(optarg, NULL, 0);
34459 if (tb_size < 0)
34460@@ -5545,6 +5554,17 @@ int main(int argc, char **argv, char **envp)
34461 exit(1);
34462 }
34463 }
34464+#ifdef TARGET_OPENGL_OK
34465+ if (enable_gl) {
34466+ /* Use second serial port */
34467+ int opengl_serial = 1;
34468+
34469+ if (serial_devices[opengl_serial])
34470+ fprintf(stderr, "overriding second serial "
34471+ "port for OpenGL use\n");
34472+ serial_devices[opengl_serial] = "opengl";
34473+ }
34474+#endif
34475
34476 if (monitor_device) {
34477 monitor_hd = qemu_chr_open("monitor", monitor_device, NULL);