summaryrefslogtreecommitdiff
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-01-19 23:46:37 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-19 23:46:37 +0000
commitf6ea2f84fb4977b888720d7cbed8e7de266014a8 (patch)
tree6dc6db873092cd2ee6bd54f0d16e0884a0bae7b3 /meta/packages
parent7fc734effe555dd39a828ac800f10caa8f462cd3 (diff)
downloadopenembedded-core-f6ea2f84fb4977b888720d7cbed8e7de266014a8.tar.gz
openembedded-core-f6ea2f84fb4977b888720d7cbed8e7de266014a8.tar.bz2
openembedded-core-f6ea2f84fb4977b888720d7cbed8e7de266014a8.tar.xz
openembedded-core-f6ea2f84fb4977b888720d7cbed8e7de266014a8.zip
qemu: Add host gl support for qemu x86
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/qemu/qemu-0.9.1+svnr6190/qemu-add-gl-host-code.patch33906
-rw-r--r--meta/packages/qemu/qemu_svn.bb6
2 files changed, 33910 insertions, 2 deletions
diff --git a/meta/packages/qemu/qemu-0.9.1+svnr6190/qemu-add-gl-host-code.patch b/meta/packages/qemu/qemu-0.9.1+svnr6190/qemu-add-gl-host-code.patch
new file mode 100644
index 000000000..23aef3830
--- /dev/null
+++ b/meta/packages/qemu/qemu-0.9.1+svnr6190/qemu-add-gl-host-code.patch
@@ -0,0 +1,33906 @@
+Index: trunk/Makefile.target
+===================================================================
+--- trunk.orig/Makefile.target 2009-01-19 23:00:33.000000000 +0000
++++ trunk/Makefile.target 2009-01-19 23:08:18.000000000 +0000
+@@ -199,6 +199,10 @@
+ CPPFLAGS+=-I$(SRC_PATH)/fpu
+ LIBOBJS+= op_helper.o helper.o
+
++ifeq ($(TARGET_BASE_ARCH), i386)
++LIBOBJS+=helper_opengl.o opengl_exec.o
++endif
++
+ ifeq ($(TARGET_BASE_ARCH), arm)
+ LIBOBJS+= neon_helper.o iwmmxt_helper.o
+ endif
+@@ -277,6 +281,21 @@
+ cpu-exec.o: cpu-exec.c
+ $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
++parse_gl_h: parse_gl_h.c
++ $(CC) -g -o $@ $<
++server_stub.c: parse_gl_h
++ ./parse_gl_h
++gl_func.h: parse_gl_h
++ ./parse_gl_h
++GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
++opengl_func.h: gl_func.h
++helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
++ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
++gl_beginend.h: ../target-i386/beginend_funcs.sh
++ $< > $@
++opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
++ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
++
+ #########################################################
+ # Linux user emulator target
+
+@@ -639,7 +658,7 @@
+ OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
+ OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o
+ OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
+-CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
++CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE -DTARGET_OPENGL_OK
+ endif
+ ifeq ($(TARGET_BASE_ARCH), ppc)
+ CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
+@@ -774,7 +793,7 @@
+ endif
+
+ $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
+- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) -lGL -lGLU
+
+ endif # !CONFIG_USER_ONLY
+
+Index: trunk/hw/vmware_vga.c
+===================================================================
+--- trunk.orig/hw/vmware_vga.c 2009-01-05 11:10:15.000000000 +0000
++++ trunk/hw/vmware_vga.c 2009-01-19 23:06:08.000000000 +0000
+@@ -485,6 +485,8 @@
+
+ #define CMD(f) le32_to_cpu(s->cmd->f)
+
++static uint32_t last_cmd;
++
+ static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
+ {
+ if (!s->config || !s->enable)
+@@ -494,11 +496,18 @@
+
+ static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
+ {
+- uint32_t cmd = s->fifo[CMD(stop) >> 2];
+- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
+- if (CMD(stop) >= CMD(max))
++ int offset = CMD(stop);
++
++ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
++ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
++ __FUNCTION__, last_cmd);
++ return 0x00000000;
++ }
++
++ s->cmd->stop = cpu_to_le32(offset + 4);
++ if (offset + 4 >= CMD(max))
+ s->cmd->stop = s->cmd->min;
+- return cmd;
++ return s->fifo[offset >> 2];
+ }
+
+ static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
+@@ -508,12 +517,12 @@
+
+ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
+ {
+- uint32_t cmd, colour;
++ uint32_t colour;
+ int args = 0;
+ int x, y, dx, dy, width, height;
+ struct vmsvga_cursor_definition_s cursor;
+ while (!vmsvga_fifo_empty(s))
+- switch (cmd = vmsvga_fifo_read(s)) {
++ switch (last_cmd = vmsvga_fifo_read(s)) {
+ case SVGA_CMD_UPDATE:
+ case SVGA_CMD_UPDATE_VERBOSE:
+ x = vmsvga_fifo_read(s);
+@@ -613,7 +622,7 @@
+ while (args --)
+ vmsvga_fifo_read(s);
+ printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
+- __FUNCTION__, cmd);
++ __FUNCTION__, last_cmd);
+ break;
+ }
+
+Index: trunk/kqemu.c
+===================================================================
+--- trunk.orig/kqemu.c 2009-01-05 11:10:24.000000000 +0000
++++ trunk/kqemu.c 2009-01-19 23:06:08.000000000 +0000
+@@ -84,6 +84,8 @@
+ int qpi_io_memory;
+ uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
+
++extern int enable_gl;
++
+ #define cpuid(index, eax, ebx, ecx, edx) \
+ asm volatile ("cpuid" \
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
+@@ -867,6 +869,22 @@
+ else
+ env->hflags &= ~HF_OSFXSR_MASK;
+
++ /* OPENGL Stuff */
++ if (enable_gl && ((env->hflags & HF_CPL_MASK) == 3)) {
++ int index = (env->eip >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
++ if (env->segs[R_CS].base != 0)
++ fprintf(stderr, "env->segs[R_CS].base != 0 !\n");
++ else if (__builtin_expect(env->tlb_table[1][index].addr_code !=
++ (env->eip & TARGET_PAGE_MASK), 0))
++ ldub_code(env->eip);
++
++ if (env->tlb_table[1][index].addend) {
++ unsigned char *ptr = env->eip + env->tlb_table[1][index].addend;
++ if (ptr[0] == 0xCD && ptr[1] == 0x99)
++ helper_opengl();
++ }
++ }
++
+ #ifdef DEBUG
+ if (loglevel & CPU_LOG_INT) {
+ fprintf(logfile, "kqemu: kqemu_cpu_exec: ret=0x%x\n", ret);
+Index: trunk/sdl.c
+===================================================================
+--- trunk.orig/sdl.c 2009-01-19 23:00:33.000000000 +0000
++++ trunk/sdl.c 2009-01-19 23:28:22.000000000 +0000
+@@ -26,6 +26,7 @@
+ #include "sysemu.h"
+
+ #include <SDL.h>
++#include <SDL_syswm.h>
+
+ #ifndef _WIN32
+ #include <signal.h>
+@@ -50,6 +51,10 @@
+ static int guest_x, guest_y;
+ static SDL_Cursor *guest_sprite = 0;
+
++#ifdef TARGET_OPENGL_OK
++extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
++#endif
++
+ static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
+ {
+ // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
+@@ -58,6 +63,7 @@
+
+ static void sdl_resize(DisplayState *ds, int w, int h)
+ {
++ SDL_SysWMinfo info;
+ int flags;
+
+ // printf("resizing to %d %d\n", w, h);
+@@ -72,6 +78,17 @@
+ height = h;
+
+ again:
++ if (ds->data != NULL) {
++ SDL_VERSION(&info.version);
++ SDL_GetWMInfo(&info);
++#ifdef TARGET_OPENGL_OK
++ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
++ opengl_exec_set_parent_window(info.info.x11.display,
++ RootWindow(info.info.x11.display,
++ DefaultScreen(info.info.x11.display)));
++#endif
++ }
++
+ screen = SDL_SetVideoMode(w, h, 0, flags);
+ if (!screen) {
+ fprintf(stderr, "Could not open SDL display\n");
+@@ -86,6 +103,13 @@
+ fprintf(stderr, "Could not open SDL display\n");
+ exit(1);
+ }
++
++ SDL_VERSION(&info.version);
++ SDL_GetWMInfo(&info);
++#ifdef TARGET_OPENGL_OK
++ opengl_exec_set_parent_window(info.info.x11.display, info.info.x11.window);
++#endif
++
+ ds->data = screen->pixels;
+ ds->linesize = screen->pitch;
+ ds->depth = screen->format->BitsPerPixel;
+@@ -574,6 +598,10 @@
+ line = image;
+ for (x = 0; x < width; x ++, dst ++) {
+ switch (bpp) {
++ case 32:
++ src = *(line ++); src |= *(line ++);
++ src = *(line ++); src |= *(line ++);
++ break;
+ case 24:
+ src = *(line ++); src |= *(line ++); src |= *(line ++);
+ break;
+@@ -643,6 +671,7 @@
+ ds->dpy_fill = sdl_fill;
+ ds->mouse_set = sdl_mouse_warp;
+ ds->cursor_define = sdl_mouse_define;
++ ds->data = NULL;
+
+ sdl_resize(ds, 640, 400);
+ sdl_update_caption();
+Index: trunk/target-i386/beginend_funcs.sh
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/beginend_funcs.sh 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,23 @@
++#! /bin/sh
++# Copyright 2008 (C) Intel Corporation
++#
++# echo names of functions that are legal between a glBegin and glEnd pair.
++echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
++echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
++echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
++echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
++echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
++echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
++echo -e MAGIC_MACRO\(glArrayElement\)\\n
++echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
++echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
++echo -e MAGIC_MACRO\(glCallList\)\\n
++echo -e MAGIC_MACRO\(glCallLists\)\\n
++echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
+Index: trunk/target-i386/ghash.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/ghash.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,347 @@
++/* This is a modified and simplified version of original ghash.c */
++
++/* GLIB - Library of useful routines for C programming
++ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++/*
++ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
++ * file for a list of people on the GLib Team. See the ChangeLog
++ * files for a list of changes. These files are distributed with
++ * GLib at ftp://ftp.gtk.org/pub/gtk/.
++ */
++
++
++#include <stdlib.h>
++
++#include "ghash.h"
++
++#define HASH_TABLE_MIN_SIZE 11
++#define HASH_TABLE_MAX_SIZE 13845163
++
++#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
++
++
++typedef struct _SimpleHashNode SimpleHashNode;
++
++struct _SimpleHashNode
++{
++ int key;
++ void* value;
++ SimpleHashNode *next;
++};
++
++struct _SimpleHashTable
++{
++ int size;
++ int nnodes;
++ SimpleHashNode **nodes;
++ SimpleDestroyNotify value_destroy_func;
++};
++
++static const unsigned int simple_primes[] =
++{
++ 11,
++ 19,
++ 37,
++ 73,
++ 109,
++ 163,
++ 251,
++ 367,
++ 557,
++ 823,
++ 1237,
++ 1861,
++ 2777,
++ 4177,
++ 6247,
++ 9371,
++ 14057,
++ 21089,
++ 31627,
++ 47431,
++ 71143,
++ 106721,
++ 160073,
++ 240101,
++ 360163,
++ 540217,
++ 810343,
++ 1215497,
++ 1823231,
++ 2734867,
++ 4102283,
++ 6153409,
++ 9230113,
++ 13845163,
++};
++
++static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
++
++unsigned int simple_spaced_primes_closest (unsigned int num)
++{
++ int i;
++
++ for (i = 0; i < simple_nprimes; i++)
++ if (simple_primes[i] > num)
++ return simple_primes[i];
++
++ return simple_primes[simple_nprimes - 1];
++}
++
++#define HASH_TABLE_RESIZE(hash_table) \
++ do { \
++ if ((hash_table->size >= 3 * hash_table->nnodes && \
++ hash_table->size > HASH_TABLE_MIN_SIZE) || \
++ (3 * hash_table->size <= hash_table->nnodes && \
++ hash_table->size < HASH_TABLE_MAX_SIZE)) \
++ simple_hash_table_resize (hash_table); \
++ } while(0)
++
++static void simple_hash_table_resize (SimpleHashTable *hash_table);
++static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
++ int key);
++static SimpleHashNode* simple_hash_node_new (int key,
++ void* value);
++static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
++ SimpleDestroyNotify value_destroy_func);
++
++
++#define alloc0(type, n) (type*)calloc(n, sizeof(type))
++
++SimpleHashTable*
++simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
++{
++ SimpleHashTable *hash_table;
++
++ hash_table = alloc0(SimpleHashTable, 1);
++ hash_table->size = HASH_TABLE_MIN_SIZE;
++ hash_table->nnodes = 0;
++ hash_table->value_destroy_func = value_destroy_func;
++ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
++
++ return hash_table;
++}
++
++SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
++ SimpleCloneValue clone_value_func)
++{
++ SimpleHashTable *hash_table_new;
++ SimpleHashNode *new_node;
++ SimpleHashNode *node;
++ int i;
++
++ hash_table_new = alloc0 (SimpleHashTable, 1);
++ hash_table_new->size = hash_table->size;
++ hash_table_new->nnodes = hash_table->nnodes;
++ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
++ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
++ for (i = 0; i < hash_table->size; i++)
++ {
++ node = hash_table->nodes[i];
++ while(node)
++ {
++ SimpleHashNode *next = hash_table_new->nodes[i];
++ new_node = simple_hash_node_new(node->key,
++ (clone_value_func)? clone_value_func(node->value) : node->value);
++ new_node->next = next;
++ hash_table_new->nodes[i] = new_node;
++ node = node->next;
++ }
++ }
++ return hash_table_new;
++}
++
++void
++simple_hash_table_destroy (SimpleHashTable *hash_table)
++{
++ int i;
++
++ for (i = 0; i < hash_table->size; i++)
++ {
++ simple_hash_nodes_destroy (hash_table->nodes[i],
++ hash_table->value_destroy_func);
++ hash_table->nodes[i] = NULL;
++ }
++ free (hash_table->nodes);
++ free (hash_table);
++}
++
++static inline SimpleHashNode**
++simple_hash_table_lookup_node (SimpleHashTable *hash_table,
++ int key)
++{
++ SimpleHashNode **node;
++
++ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
++ while (*node && (*node)->key != key)
++ node = &(*node)->next;
++
++ return node;
++}
++
++void*
++simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
++{
++ SimpleHashNode *node;
++
++ node = *simple_hash_table_lookup_node (hash_table, key);
++
++ return node ? node->value : NULL;
++}
++
++void**
++simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
++{
++ SimpleHashNode *node;
++
++ node = *simple_hash_table_lookup_node (hash_table, key);
++
++ return node ? &node->value : NULL;
++}
++
++
++void
++simple_hash_table_insert (SimpleHashTable *hash_table,
++ int key,
++ void* value)
++{
++ SimpleHashNode **node;
++
++ node = simple_hash_table_lookup_node (hash_table, key);
++
++ if (*node)
++ {
++ /* do not reset node->key in this place, keeping
++ * the old key is the intended behaviour.
++ * simple_hash_table_replace() can be used instead.
++ */
++ if (hash_table->value_destroy_func)
++ hash_table->value_destroy_func ((*node)->value);
++
++ (*node)->value = value;
++ }
++ else
++ {
++ *node = simple_hash_node_new (key, value);
++ hash_table->nnodes++;
++ HASH_TABLE_RESIZE (hash_table);
++ }
++}
++int
++simple_hash_table_remove (SimpleHashTable *hash_table,
++ int key)
++{
++ SimpleHashNode **node, *dest;
++
++ node = simple_hash_table_lookup_node (hash_table, key);
++ if (*node)
++ {
++ dest = *node;
++ (*node) = dest->next;
++ if (hash_table->value_destroy_func)
++ hash_table->value_destroy_func (dest->value);
++ free (dest);
++ hash_table->nnodes--;
++
++ HASH_TABLE_RESIZE (hash_table);
++
++ return 1;
++ }
++
++ return 0;
++}
++
++
++void
++simple_hash_table_foreach (SimpleHashTable *hash_table,
++ SimpleHFunc func,
++ void* user_data)
++{
++ SimpleHashNode *node;
++ int i;
++
++ for (i = 0; i < hash_table->size; i++)
++ for (node = hash_table->nodes[i]; node; node = node->next)
++ (* func) (node->key, node->value, user_data);
++}
++
++unsigned int
++simple_hash_table_size (SimpleHashTable *hash_table)
++{
++ return hash_table->nnodes;
++}
++
++static void
++simple_hash_table_resize (SimpleHashTable *hash_table)
++{
++ SimpleHashNode **new_nodes;
++ SimpleHashNode *node;
++ SimpleHashNode *next;
++ unsigned int hash_val;
++ int new_size;
++ int i;
++
++ new_size = simple_spaced_primes_closest (hash_table->nnodes);
++ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
++
++ new_nodes = alloc0 (SimpleHashNode*, new_size);
++
++ for (i = 0; i < hash_table->size; i++)
++ for (node = hash_table->nodes[i]; node; node = next)
++ {
++ next = node->next;
++
++ hash_val = (unsigned int)(node->key) % new_size;
++
++ node->next = new_nodes[hash_val];
++ new_nodes[hash_val] = node;
++ }
++
++ free (hash_table->nodes);
++ hash_table->nodes = new_nodes;
++ hash_table->size = new_size;
++}
++
++static SimpleHashNode*
++simple_hash_node_new (int key,
++ void* value)
++{
++ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
++
++ hash_node->key = key;
++ hash_node->value = value;
++ hash_node->next = NULL;
++
++ return hash_node;
++}
++
++static void
++simple_hash_nodes_destroy (SimpleHashNode *hash_node,
++ SimpleDestroyNotify value_destroy_func)
++{
++ while (hash_node)
++ {
++ SimpleHashNode *next = hash_node->next;
++ if (value_destroy_func)
++ value_destroy_func (hash_node->value);
++ free (hash_node);
++ hash_node = next;
++ }
++}
+Index: trunk/target-i386/ghash.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/ghash.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,59 @@
++/* This is a modified and simplified version of original ghash.h */
++
++
++/* GLIB - Library of useful routines for C programming
++ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++/*
++ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
++ * file for a list of people on the GLib Team. See the ChangeLog
++ * files for a list of changes. These files are distributed with
++ * GLib at ftp://ftp.gtk.org/pub/gtk/.
++ */
++
++#ifndef __SIMPLE_HASH_H__
++#define __SIMPLE_HASH_H__
++
++typedef struct _SimpleHashTable SimpleHashTable;
++
++typedef void (*SimpleDestroyNotify)(void*);
++typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
++typedef void* (*SimpleCloneValue)(void* value);
++
++/* Hash tables
++ */
++SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
++SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
++ SimpleCloneValue clone_value_func);
++void simple_hash_table_destroy (SimpleHashTable *hash_table);
++void simple_hash_table_insert (SimpleHashTable *hash_table,
++ int key,
++ void* value);
++int simple_hash_table_remove (SimpleHashTable *hash_table,
++ int key);
++void* simple_hash_table_lookup (SimpleHashTable *hash_table,
++ int key);
++void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
++void simple_hash_table_foreach (SimpleHashTable *hash_table,
++ SimpleHFunc func,
++ void* user_data);
++unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
++
++#endif /* __SIMPLE_HASH_H__ */
++
+Index: trunk/target-i386/gl_func_perso.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/gl_func_perso.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,135 @@
++/*
++ * Hand-implemented GL/GLX API
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++MAGIC_MACRO(_init32),
++MAGIC_MACRO(_init64),
++MAGIC_MACRO(_synchronize),
++MAGIC_MACRO(_serialized_calls),
++MAGIC_MACRO(_exit_process),
++MAGIC_MACRO(_moveResizeWindow),
++MAGIC_MACRO(_changeWindowState),
++MAGIC_MACRO(_send_cursor),
++
++/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
++MAGIC_MACRO(glXChooseVisual),
++MAGIC_MACRO(glXQueryExtensionsString),
++MAGIC_MACRO(glXQueryServerString),
++MAGIC_MACRO(glXCreateContext),
++MAGIC_MACRO(glXCopyContext),
++MAGIC_MACRO(glXDestroyContext),
++MAGIC_MACRO(glXGetClientString),
++MAGIC_MACRO(glXQueryVersion),
++MAGIC_MACRO(glXMakeCurrent),
++MAGIC_MACRO(glXGetConfig),
++MAGIC_MACRO(glXGetConfig_extended),
++MAGIC_MACRO(glXWaitGL),
++MAGIC_MACRO(glXWaitX),
++MAGIC_MACRO(glXGetFBConfigAttrib_extended),
++MAGIC_MACRO(glXChooseFBConfig),
++MAGIC_MACRO(glXChooseFBConfigSGIX),
++MAGIC_MACRO(glXGetFBConfigs),
++MAGIC_MACRO(glXCreatePbuffer),
++MAGIC_MACRO(glXCreateGLXPbufferSGIX),
++MAGIC_MACRO(glXDestroyPbuffer),
++MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
++MAGIC_MACRO(glXCreateNewContext),
++MAGIC_MACRO(glXCreateContextWithConfigSGIX),
++MAGIC_MACRO(glXGetVisualFromFBConfig),
++MAGIC_MACRO(glXGetFBConfigAttrib),
++MAGIC_MACRO(glXGetFBConfigAttribSGIX),
++MAGIC_MACRO(glXQueryContext),
++MAGIC_MACRO(glXQueryDrawable),
++MAGIC_MACRO(glXQueryGLXPbufferSGIX),
++MAGIC_MACRO(glXUseXFont),
++MAGIC_MACRO(glXIsDirect),
++MAGIC_MACRO(glXGetProcAddress_fake),
++MAGIC_MACRO(glXGetProcAddress_global_fake),
++MAGIC_MACRO(glXSwapBuffers),
++MAGIC_MACRO(glXQueryExtension),
++MAGIC_MACRO(glXGetScreenDriver),
++MAGIC_MACRO(glXGetDriverConfig),
++MAGIC_MACRO(glXSwapIntervalSGI),
++MAGIC_MACRO(glXBindTexImageATI),
++MAGIC_MACRO(glXReleaseTexImageATI),
++MAGIC_MACRO(glXBindTexImageARB),
++MAGIC_MACRO(glXReleaseTexImageARB),
++
++MAGIC_MACRO(glGetString),
++
++MAGIC_MACRO(glShaderSourceARB_fake),
++MAGIC_MACRO(glShaderSource_fake),
++MAGIC_MACRO(glVertexPointer_fake),
++MAGIC_MACRO(glNormalPointer_fake),
++MAGIC_MACRO(glColorPointer_fake),
++MAGIC_MACRO(glSecondaryColorPointer_fake),
++MAGIC_MACRO(glIndexPointer_fake),
++MAGIC_MACRO(glTexCoordPointer_fake),
++MAGIC_MACRO(glEdgeFlagPointer_fake),
++MAGIC_MACRO(glVertexAttribPointerARB_fake),
++MAGIC_MACRO(glVertexAttribPointerNV_fake),
++MAGIC_MACRO(glWeightPointerARB_fake),
++MAGIC_MACRO(glMatrixIndexPointerARB_fake),
++MAGIC_MACRO(glFogCoordPointer_fake),
++MAGIC_MACRO(glVariantPointerEXT_fake),
++MAGIC_MACRO(glInterleavedArrays_fake),
++MAGIC_MACRO(glElementPointerATI_fake),
++MAGIC_MACRO(glTuxRacerDrawElements_fake),
++MAGIC_MACRO(glVertexAndNormalPointer_fake),
++MAGIC_MACRO(glTexCoordPointer01_fake),
++MAGIC_MACRO(glTexCoordPointer012_fake),
++MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
++MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
++MAGIC_MACRO(glGenTextures_fake),
++MAGIC_MACRO(glGenBuffersARB_fake),
++MAGIC_MACRO(glGenLists_fake),
++MAGIC_MACRO(_glDrawElements_buffer),
++MAGIC_MACRO(_glDrawRangeElements_buffer),
++MAGIC_MACRO(_glMultiDrawElements_buffer),
++MAGIC_MACRO(_glVertexPointer_buffer),
++MAGIC_MACRO(_glNormalPointer_buffer),
++MAGIC_MACRO(_glColorPointer_buffer),
++MAGIC_MACRO(_glSecondaryColorPointer_buffer),
++MAGIC_MACRO(_glIndexPointer_buffer),
++MAGIC_MACRO(_glTexCoordPointer_buffer),
++MAGIC_MACRO(_glEdgeFlagPointer_buffer),
++MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
++MAGIC_MACRO(_glWeightPointerARB_buffer),
++MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
++MAGIC_MACRO(_glFogCoordPointer_buffer),
++MAGIC_MACRO(_glVariantPointerEXT_buffer),
++MAGIC_MACRO(_glGetError_fake),
++MAGIC_MACRO(_glReadPixels_pbo),
++MAGIC_MACRO(_glDrawPixels_pbo),
++MAGIC_MACRO(_glMapBufferARB_fake),
++MAGIC_MACRO(_glSelectBuffer_fake),
++MAGIC_MACRO(_glGetSelectBuffer_fake),
++MAGIC_MACRO(_glFeedbackBuffer_fake),
++MAGIC_MACRO(_glGetFeedbackBuffer_fake),
+Index: trunk/target-i386/helper.h
+===================================================================
+--- trunk.orig/target-i386/helper.h 2009-01-05 11:10:06.000000000 +0000
++++ trunk/target-i386/helper.h 2009-01-19 23:06:08.000000000 +0000
+@@ -214,4 +214,6 @@
+ DEF_HELPER_2(rcrq, tl, tl, tl)
+ #endif
+
++DEF_HELPER_0(opengl, void)
++
+ #include "def-helper.h"
+Index: trunk/target-i386/helper_opengl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/helper_opengl.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,979 @@
++/*
++ * Host-side implementation of GL/GLX API
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++#define _XOPEN_SOURCE 600
++#include <string.h>
++#include <stdlib.h>
++#include <assert.h>
++
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++#include "exec.h"
++
++#if defined(CONFIG_USER_ONLY)
++void helper_opengl(void)
++{
++ /* TODO */
++}
++#else
++
++#include "opengl_func.h"
++
++#define ENABLE_GL_LOG
++
++extern FILE *stderr;
++
++extern void init_process_tab(void);
++extern int do_function_call(int func_number, arg_t *args, char *ret_string);
++
++extern void sdl_set_opengl_window(int x, int y, int width, int height);
++
++static int last_process_id = 0;
++static int must_save = 0;
++
++static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
++{
++ int is_user, index;
++
++ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
++ is_user = ((env->hflags & HF_CPL_MASK) == 3);
++ if (is_user == 0) {
++ fprintf(stderr, "not in userland !!!\n");
++ return NULL;
++ }
++ if (__builtin_expect
++ (env->tlb_table[is_user][index].addr_code !=
++ (addr & TARGET_PAGE_MASK), 0)) {
++ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
++
++ if (ret == -1) {
++ fprintf(stderr,
++ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
++ TARGET_FMT_lx "\n", addr, ret);
++ fprintf(stderr,
++ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
++ TARGET_FMT_lx ")\n", addr,
++ env->tlb_table[is_user][index].addr_code,
++ addr & TARGET_PAGE_MASK);
++ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
++ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
++ return NULL;
++ } else {
++ if (ret + TARGET_PAGE_SIZE <= phys_ram_size) {
++ return phys_ram_base + ret +
++ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1));
++ } else {
++ fprintf(stderr,
++ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
++ TARGET_FMT_lx "p\n", addr, ret);
++ fprintf(stderr,
++ "ret=" TARGET_FMT_lx " phys_ram_size= " TARGET_FMT_lx
++ "\n", ret, (target_ulong) phys_ram_size);
++ return NULL;
++ }
++ }
++ } else
++ return (void *) (addr + env->tlb_table[is_user][index].addend);
++}
++
++#ifndef MIN
++#define MIN(a, b) (((a) < (b)) ? (a) : (b))
++#endif
++
++enum {
++ NOT_MAPPED,
++ MAPPED_CONTIGUOUS,
++ MAPPED_NOT_CONTIGUOUS
++};
++
++#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
++
++/* Return NOT_MAPPED if a page is not mapped into target physical memory */
++/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
++/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
++static int get_target_mem_state(const CPUState *env,
++ target_ulong target_addr, int len)
++{
++ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
++ int to_end_page =
++ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
++ int ret = MAPPED_CONTIGUOUS;
++
++ if (aligned_target_addr != target_addr) {
++ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
++ void *last_phys_addr = phys_addr;
++
++ if (phys_addr == 0) {
++ return NOT_MAPPED;
++ }
++ if (len > to_end_page) {
++ len -= to_end_page;
++ aligned_target_addr += TARGET_PAGE_SIZE;
++ int i;
++
++ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
++ void *phys_addr =
++ get_phys_mem_addr(env, aligned_target_addr + i);
++ if (phys_addr == 0) {
++ return NOT_MAPPED;
++ }
++ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
++ ret = MAPPED_NOT_CONTIGUOUS;
++ last_phys_addr = phys_addr;
++ }
++ }
++ } else {
++ void *last_phys_addr = NULL;
++ int i;
++
++ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
++
++ if (phys_addr == 0) {
++ return NOT_MAPPED;
++ }
++ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
++ ret = MAPPED_NOT_CONTIGUOUS;
++ last_phys_addr = phys_addr;
++ }
++ }
++ return ret;
++}
++
++/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
++/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
++static int memcpy_host_to_target(const CPUState *env,
++ target_ulong target_addr,
++ const void *host_addr, int len)
++{
++ int i;
++ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
++ int to_end_page =
++ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
++ int ret = get_target_mem_state(env, target_addr, len);
++
++ if (ret == NOT_MAPPED) {
++ return 0;
++ }
++
++ if (ret == MAPPED_CONTIGUOUS) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr);
++
++ memcpy(phys_addr, host_addr, len);
++ } else {
++ if (aligned_target_addr != target_addr) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr);
++
++ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
++ if (len <= to_end_page) {
++ return 1;
++ }
++ len -= to_end_page;
++ host_addr += to_end_page;
++ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
++ }
++ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
++
++ memcpy(phys_addr, host_addr + i,
++ (i + TARGET_PAGE_SIZE <=
++ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
++ }
++ }
++
++ return 1;
++}
++
++static int memcpy_target_to_host(const CPUState *env, void *host_addr,
++ target_ulong target_addr, int len)
++{
++ int i;
++ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
++ int to_end_page =
++ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
++ int ret = get_target_mem_state(env, target_addr, len);
++
++ if (ret == NOT_MAPPED) {
++ return 0;
++ }
++
++ if (ret == MAPPED_CONTIGUOUS) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr);
++
++ memcpy(host_addr, phys_addr, len);
++ } else {
++ if (aligned_target_addr != target_addr) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr);
++
++ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
++ if (len <= to_end_page)
++ return 1;
++
++ len -= to_end_page;
++ host_addr += to_end_page;
++ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
++ }
++ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
++
++ memcpy(host_addr + i, phys_addr,
++ (i + TARGET_PAGE_SIZE <=
++ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
++ }
++ }
++
++ return 1;
++}
++
++static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
++ target_ulong target_addr, int nb_args)
++{
++ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
++}
++
++static int wordsize = 0;
++static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
++ target_ulong target_addr, int nb_args) =
++ memcpy_target_to_host_1_1;
++
++void do_disconnect_current(void);
++void do_context_switch(Display *dpy, pid_t pid, int call);
++
++static void disconnect_current(void)
++{
++ last_process_id = 0;
++
++ return do_disconnect_current();
++}
++
++static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
++ target_ulong target_addr, int nb_args)
++{
++ int ret;
++ uint32_t args_temp[nb_args], *src = args_temp;
++ arg_t *dest = host_addr;
++
++ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
++ if (!ret)
++ return ret;
++
++ while (nb_args) {
++ /* TODO: endianness */
++ *dest = 0;
++ *(uint32_t *) (dest++) = *src++;
++ nb_args--;
++ }
++
++ return ret;
++}
++
++static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
++ target_ulong target_addr, int nb_args)
++{
++ int ret;
++ uint64_t args_temp[nb_args], *src = args_temp;
++ arg_t *dest = host_addr;
++
++ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
++ if (!ret)
++ return ret;
++
++ while (nb_args) {
++ /* TODO: endianness */
++ *dest = 0;
++ *(uint64_t *) (dest++) = *src++;
++ nb_args--;
++ }
++
++ return ret;
++}
++
++static int host_offset = 0;
++static void reset_host_offset()
++{
++ host_offset = 0;
++}
++
++/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
++/* Do not free or modify */
++static const void *get_host_read_pointer(const CPUState *env,
++ const target_ulong target_addr, int len)
++{
++ int ret = get_target_mem_state(env, target_addr, len);
++
++ if (ret == NOT_MAPPED) {
++ return NULL;
++ } else if (ret == MAPPED_CONTIGUOUS) {
++ return get_phys_mem_addr(env, target_addr);
++ } else {
++ static int host_mem_size = 0;
++ static void *host_mem = NULL;
++ static void *ret;
++
++ if (host_mem_size < host_offset + len) {
++ host_mem_size = 2 * host_mem_size + host_offset + len;
++ host_mem = realloc(host_mem, host_mem_size);
++ }
++ ret = host_mem + host_offset;
++ assert(memcpy_target_to_host(env, ret, target_addr, len));
++ host_offset += len;
++ return ret;
++ }
++}
++
++int doing_opengl = 0;
++static int last_func_number = -1;
++static size_t(*my_strlen) (const char *) = NULL;
++
++#ifdef ENABLE_GL_LOG
++static FILE *f = NULL;
++static int logger_pid = 0;
++
++#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
++
++void write_gl_debug_cmd_int(int my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(int), 1, f);
++ fflush(f);
++}
++
++void write_gl_debug_cmd_short(short my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(short), 1, f);
++ fflush(f);
++}
++
++static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
++{
++ write_gl_debug_init();
++ fwrite(&size, sizeof(int), 1, f);
++ if (size)
++ fwrite(buffer, size, 1, f);
++}
++
++static void inline write_gl_debug_cmd_buffer_without_size(
++ int size, void *buffer)
++{
++ write_gl_debug_init();
++ if (size)
++ fwrite(buffer, size, 1, f);
++}
++
++void write_gl_debug_end(void)
++{
++ write_gl_debug_init();
++ fclose(f);
++ f = NULL;
++ logger_pid = 0;
++ must_save = 0;
++}
++
++static inline int is_logging(int pid)
++{
++ return must_save && pid == logger_pid;
++}
++#endif
++
++#include <dlfcn.h>
++#include <signal.h>
++
++static void (*anticrash_handler) (void *) = NULL;
++static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
++
++void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
++{
++ static int counter = 0;
++
++ counter++;
++
++ printf("oops\n");
++
++ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
++ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
++ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
++ anticrash_handler(ptr);
++
++ counter--;
++}
++
++static int decode_call_int(CPUState *env, int func_number, int pid,
++ target_ulong target_ret_string,
++ target_ulong in_args, target_ulong in_args_size)
++{
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int ret_type = signature->ret_type;
++ /* int has_out_parameters = signature->has_out_parameters; */
++ int nb_args = signature->nb_args;
++ int *args_type = signature->args_type;
++ int i;
++ int ret;
++ int *args_size = NULL;
++ target_ulong saved_out_ptr[50];
++ static char *ret_string = NULL;
++ static arg_t args[50];
++ static Display *dpy = NULL;
++
++ if (dpy == NULL) {
++ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
++
++ if (handle) {
++ anticrash_handler = dlsym(handle, "anticrash_handler");
++ if (anticrash_handler) {
++ fprintf(stderr, "anticrash handler enabled\n");
++ struct sigaction sigsegv_action;
++ struct sigaction old_sigsegv_action;
++
++ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
++ sigemptyset(&(sigsegv_action.sa_mask));
++ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
++ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
++ }
++ }
++ handle = dlopen("libgetstack.so", RTLD_LAZY);
++ if (handle) {
++ show_stack_from_signal_handler =
++ dlsym(handle, "show_stack_from_signal_handler");
++ }
++
++ dpy = XOpenDisplay(NULL);
++ init_process_tab();
++ ret_string = malloc(32768);
++ my_strlen = strlen;
++ }
++
++ if (unlikely(last_func_number == _exit_process_func &&
++ func_number == _exit_process_func)) {
++ last_func_number = -1;
++ return 0;
++ }
++
++ if (last_process_id != pid) {
++ do_context_switch(dpy, pid, func_number);
++ last_process_id = pid;
++ }
++
++ if (unlikely(func_number == _exit_process_func))
++ last_process_id = 0;
++
++ argcpy:
++ reset_host_offset();
++
++ if (nb_args) {
++
++ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
++ fprintf(stderr, "call %s pid=%d\n",
++ tab_opengl_calls_name[func_number], pid);
++ fprintf(stderr, "cannot get call parameters\n");
++ disconnect_current();
++ return 0;
++ }
++
++ args_size =
++ (int *) get_host_read_pointer(env, in_args_size,
++ sizeof(int) * nb_args);
++ if (args_size == NULL) {
++ fprintf(stderr, "call %s pid=%d\n",
++ tab_opengl_calls_name[func_number], pid);
++ fprintf(stderr, "cannot get call parameters size\n");
++ disconnect_current();
++ return 0;
++ }
++ }
++
++ if (func_number == _serialized_calls_func) {
++ int command_buffer_size = args_size[0];
++ const void *command_buffer =
++ get_host_read_pointer(env, args[0], command_buffer_size);
++ int commmand_buffer_offset = 0;
++
++ args_size = NULL;
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_short(_serialized_calls_func);
++#endif
++
++ while (commmand_buffer_offset < command_buffer_size) {
++ func_number =
++ *(short *) (command_buffer + commmand_buffer_offset);
++ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
++ fprintf(stderr,
++ "func_number >= 0 && func_number < GL_N_CALLS failed at "
++ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
++ commmand_buffer_offset, command_buffer_size);
++ return 0;
++ }
++ commmand_buffer_offset += sizeof(short);
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_short(func_number);
++#endif
++
++ signature = (Signature *) tab_opengl_calls[func_number];
++ ret_type = signature->ret_type;
++ assert(ret_type == TYPE_NONE);
++ nb_args = signature->nb_args;
++ args_type = signature->args_type;
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++ {
++ args[i] =
++ *(int *) (command_buffer +
++ commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_int(args[i]);
++#endif
++ commmand_buffer_offset += sizeof(int);
++ break;
++ }
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ {
++ int arg_size =
++ *(int *) (command_buffer +
++ commmand_buffer_offset);
++ commmand_buffer_offset += sizeof(int);
++
++ if (arg_size == 0) {
++ args[i] = 0;
++ } else {
++ args[i] =
++ (long) (command_buffer +
++ commmand_buffer_offset);
++ }
++
++ if (args[i] == 0) {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i,
++ pid);
++ disconnect_current();
++ return 0;
++ }
++ } else {
++ if (arg_size == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i,
++ pid);
++ fprintf(stderr, "args_size[i] == 0 !!\n");
++ disconnect_current();
++ return 0;
++ }
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_with_size(arg_size,
++ (void *)
++ args[i]);
++#endif
++ commmand_buffer_offset += arg_size;
++
++ break;
++ }
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ int arg_size =
++ compute_arg_length(stderr, func_number, i, args);
++ args[i] =
++ (arg_size) ? (long) (command_buffer +
++ commmand_buffer_offset) : 0;
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_without_size(arg_size,
++ (void *)
++ args[i]);
++#endif
++ commmand_buffer_offset += arg_size;
++ break;
++ }
++
++ CASE_OUT_POINTERS:
++ {
++ fprintf(stderr,
++ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ args[i] =
++ (long) (command_buffer + commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_without_size(
++ tab_args_type_length[args_type[i]],
++ (void *) args[i]);
++#endif
++ commmand_buffer_offset +=
++ tab_args_type_length[args_type[i]];
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr,
++ "shouldn't happen : call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ }
++ }
++ do_function_call(func_number, args, ret_string);
++ }
++
++ ret = 0;
++ } else {
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_short(func_number);
++#endif
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_int(args[i]);
++#endif
++ break;
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ if (args[i] == 0 && args_size[i] == 0) {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ }
++ } else if (args[i] == 0 && args_size[i] != 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
++ disconnect_current();
++ return 0;
++ } else if (args[i] != 0 && args_size[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
++ disconnect_current();
++ return 0;
++ }
++ if (args[i]) {
++ args[i] =
++ (arg_t) get_host_read_pointer(env, args[i],
++ args_size[i]);
++ if (args[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "can not get %d bytes\n",
++ args_size[i]);
++ disconnect_current();
++ return 0;
++ }
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_with_size(args_size[i],
++ (void *) args[i]);
++#endif
++ break;
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] =
++ compute_arg_length(stderr, func_number, i, args);
++ args[i] = (args_size[i]) ? (arg_t)
++ get_host_read_pointer(env,
++ args[i], args_size [i]) : 0;
++ if (args[i] == 0 && args_size[i] != 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "can not get %d bytes\n",
++ args_size[i]);
++ disconnect_current();
++ return 0;
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_without_size(args_size[i],
++ (void *) args[i]);
++#endif
++ break;
++ }
++
++ CASE_OUT_POINTERS:
++ {
++ int mem_state;
++
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ switch (args_type[i]) {
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ write_gl_debug_cmd_int(args_size[i]);
++ break;
++
++ default:
++ break;
++ }
++#endif
++
++ if (func_number == glXQueryExtension_func && args[i] == 0) {
++ saved_out_ptr[i] = 0;
++ continue;
++ }
++ if (args[i] == 0 && args_size[i] == 0) {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i,
++ pid);
++ disconnect_current();
++ return 0;
++ }
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ } else if (args[i] == 0 && args_size[i] != 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr,
++ "args[i] == 0 && args_size[i] != 0 !!\n");
++ disconnect_current();
++ return 0;
++ } else if (args[i] != 0 && args_size[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr,
++ "args[i] != 0 && args_size[i] == 0 !!\n");
++ disconnect_current();
++ return 0;
++ }
++ if (args[i]) {
++ mem_state =
++ get_target_mem_state(env, args[i], args_size[i]);
++ if (mem_state == NOT_MAPPED) {
++ fprintf(stderr,
++ "call %s arg %d pid=%d addr="
++ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
++ tab_opengl_calls_name[func_number], i,
++ pid, args[i], args_size[i]);
++ disconnect_current();
++ return 0;
++ } else if (mem_state == MAPPED_CONTIGUOUS) {
++ saved_out_ptr[i] = 0;
++ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
++ } else {
++ saved_out_ptr[i] = args[i];
++ args[i] = (arg_t) malloc(args_size[i]);
++ }
++ } else {
++ saved_out_ptr[i] = 0;
++ }
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ if (args[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "can not get %d bytes\n",
++ tab_args_type_length[args_type[i]]);
++ disconnect_current();
++ return 0;
++ }
++ args[i] = (arg_t) get_host_read_pointer(env,
++ args[i], tab_args_type_length[args_type[i]]);
++ if (args[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "can not get %d bytes\n",
++ tab_args_type_length[args_type[i]]);
++ disconnect_current();
++ return 0;
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_without_size
++ (tab_args_type_length[args_type[i]],
++ (void *) args[i]);
++#endif
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ }
++ }
++
++ if (ret_type == TYPE_CONST_CHAR) {
++ ret_string[0] = 0;
++ }
++
++ if (func_number == _init32_func || func_number == _init64_func) {
++ if (func_number == _init32_func) {
++ if (!wordsize) {
++ wordsize = 32;
++ argcpy_target_to_host = memcpy_target32_to_host;
++ goto argcpy;
++ }
++
++ if (wordsize != 32) {
++ fprintf(stderr,
++ "clients with different ABIs not supported\n");
++ exit(-1);
++ }
++ } else {
++ if (!wordsize) {
++ wordsize = 64;
++ argcpy_target_to_host = memcpy_target64_to_host;
++ goto argcpy;
++ }
++
++ if (wordsize != 64) {
++ fprintf(stderr,
++ "clients with different ABIs not supported\n");
++ exit(-1);
++ }
++ }
++
++ if (must_save && args[0])
++ fprintf(stderr, "error: pid %i is already recording\n",
++ logger_pid);
++ else if (args[0]) {
++ logger_pid = pid;
++ must_save = 1;
++ }
++#ifdef USE_KQEMU
++ if (env->kqemu_enabled)
++ *(int *) args[1] = 2;
++ else
++#endif
++ *(int *) args[1] = 1;
++ ret = 0;
++ } else {
++ ret = do_function_call(func_number, args, ret_string);
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
++ write_gl_debug_cmd_int(ret);
++#endif
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ CASE_OUT_POINTERS:
++ {
++ if (saved_out_ptr[i]) {
++ if (memcpy_host_to_target(env, saved_out_ptr[i],
++ (void *) args[i],
++ args_size[i]) == 0) {
++ fprintf(stderr, "could not copy out parameters "
++ "back to user space\n");
++ disconnect_current();
++ return 0;
++ }
++ free((void *) args[i]);
++ }
++ break;
++ }
++
++ default:
++ break;
++ }
++ }
++
++ if (ret_type == TYPE_CONST_CHAR)
++ if (target_ret_string) {
++ /* the my_strlen stuff is a hack to workaround a GCC bug if
++ * using directly strlen... */
++ if (memcpy_host_to_target(env, target_ret_string, ret_string,
++ my_strlen(ret_string) + 1) == 0) {
++ fprintf(stderr, "cannot copy out parameters "
++ "back to user space\n");
++ disconnect_current();
++ return 0;
++ }
++ }
++ }
++
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid) && func_number == _exit_process_func) {
++ write_gl_debug_end();
++ }
++#endif
++
++ return ret;
++}
++
++static int decode_call(CPUState *env, int func_number, int pid,
++ target_ulong target_ret_string, target_ulong in_args,
++ target_ulong in_args_size)
++{
++ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
++ fprintf(stderr,
++ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
++ return 0;
++ }
++
++ return decode_call_int(env, func_number, pid,
++ target_ret_string, in_args, in_args_size);
++}
++
++void helper_opengl(void)
++{
++ doing_opengl = 1;
++ env->regs[R_EAX] =
++ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
++ env->regs[R_EDX], env->regs[R_ESI]);
++ doing_opengl = 0;
++}
++#endif
+Index: trunk/target-i386/mesa_enums.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/mesa_enums.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,4890 @@
++/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
++
++/*
++ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
++ * All Rights Reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sub license,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
++ * BRIAN PAUL,
++ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
++ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ */
++
++#include "glheader.h"
++#include "enums.h"
++#include "imports.h"
++
++typedef struct {
++ size_t offset;
++ int n;
++} enum_elt;
++
++LONGSTRING static const char enum_string_table[] =
++ "GL_2D\0"
++ "GL_2_BYTES\0"
++ "GL_3D\0"
++ "GL_3D_COLOR\0"
++ "GL_3D_COLOR_TEXTURE\0"
++ "GL_3_BYTES\0"
++ "GL_4D_COLOR_TEXTURE\0"
++ "GL_4_BYTES\0"
++ "GL_ACCUM\0"
++ "GL_ACCUM_ALPHA_BITS\0"
++ "GL_ACCUM_BLUE_BITS\0"
++ "GL_ACCUM_BUFFER_BIT\0"
++ "GL_ACCUM_CLEAR_VALUE\0"
++ "GL_ACCUM_GREEN_BITS\0"
++ "GL_ACCUM_RED_BITS\0"
++ "GL_ACTIVE_ATTRIBUTES\0"
++ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
++ "GL_ACTIVE_STENCIL_FACE_EXT\0"
++ "GL_ACTIVE_TEXTURE\0"
++ "GL_ACTIVE_TEXTURE_ARB\0"
++ "GL_ACTIVE_UNIFORMS\0"
++ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
++ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
++ "GL_ADD\0"
++ "GL_ADD_SIGNED\0"
++ "GL_ADD_SIGNED_ARB\0"
++ "GL_ADD_SIGNED_EXT\0"
++ "GL_ALIASED_LINE_WIDTH_RANGE\0"
++ "GL_ALIASED_POINT_SIZE_RANGE\0"
++ "GL_ALL_ATTRIB_BITS\0"
++ "GL_ALL_CLIENT_ATTRIB_BITS\0"
++ "GL_ALPHA\0"
++ "GL_ALPHA12\0"
++ "GL_ALPHA12_EXT\0"
++ "GL_ALPHA16\0"
++ "GL_ALPHA16_EXT\0"
++ "GL_ALPHA4\0"
++ "GL_ALPHA4_EXT\0"
++ "GL_ALPHA8\0"
++ "GL_ALPHA8_EXT\0"
++ "GL_ALPHA_BIAS\0"
++ "GL_ALPHA_BITS\0"
++ "GL_ALPHA_SCALE\0"
++ "GL_ALPHA_TEST\0"
++ "GL_ALPHA_TEST_FUNC\0"
++ "GL_ALPHA_TEST_REF\0"
++ "GL_ALWAYS\0"
++ "GL_AMBIENT\0"
++ "GL_AMBIENT_AND_DIFFUSE\0"
++ "GL_AND\0"
++ "GL_AND_INVERTED\0"
++ "GL_AND_REVERSE\0"
++ "GL_ARRAY_BUFFER\0"
++ "GL_ARRAY_BUFFER_ARB\0"
++ "GL_ARRAY_BUFFER_BINDING\0"
++ "GL_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_ATTACHED_SHADERS\0"
++ "GL_ATTRIB_ARRAY_POINTER_NV\0"
++ "GL_ATTRIB_ARRAY_SIZE_NV\0"
++ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
++ "GL_ATTRIB_ARRAY_TYPE_NV\0"
++ "GL_ATTRIB_STACK_DEPTH\0"
++ "GL_AUTO_NORMAL\0"
++ "GL_AUX0\0"
++ "GL_AUX1\0"
++ "GL_AUX2\0"
++ "GL_AUX3\0"
++ "GL_AUX_BUFFERS\0"
++ "GL_BACK\0"
++ "GL_BACK_LEFT\0"
++ "GL_BACK_RIGHT\0"
++ "GL_BGR\0"
++ "GL_BGRA\0"
++ "GL_BITMAP\0"
++ "GL_BITMAP_TOKEN\0"
++ "GL_BLEND\0"
++ "GL_BLEND_COLOR\0"
++ "GL_BLEND_COLOR_EXT\0"
++ "GL_BLEND_DST\0"
++ "GL_BLEND_DST_ALPHA\0"
++ "GL_BLEND_DST_RGB\0"
++ "GL_BLEND_EQUATION\0"
++ "GL_BLEND_EQUATION_ALPHA\0"
++ "GL_BLEND_EQUATION_ALPHA_EXT\0"
++ "GL_BLEND_EQUATION_EXT\0"
++ "GL_BLEND_EQUATION_RGB_EXT\0"
++ "GL_BLEND_SRC\0"
++ "GL_BLEND_SRC_ALPHA\0"
++ "GL_BLEND_SRC_RGB\0"
++ "GL_BLUE\0"
++ "GL_BLUE_BIAS\0"
++ "GL_BLUE_BITS\0"
++ "GL_BLUE_SCALE\0"
++ "GL_BOOL\0"
++ "GL_BOOL_ARB\0"
++ "GL_BOOL_VEC2\0"
++ "GL_BOOL_VEC2_ARB\0"
++ "GL_BOOL_VEC3\0"
++ "GL_BOOL_VEC3_ARB\0"
++ "GL_BOOL_VEC4\0"
++ "GL_BOOL_VEC4_ARB\0"
++ "GL_BUFFER_ACCESS\0"
++ "GL_BUFFER_ACCESS_ARB\0"
++ "GL_BUFFER_MAPPED\0"
++ "GL_BUFFER_MAPPED_ARB\0"
++ "GL_BUFFER_MAP_POINTER\0"
++ "GL_BUFFER_MAP_POINTER_ARB\0"
++ "GL_BUFFER_SIZE\0"
++ "GL_BUFFER_SIZE_ARB\0"
++ "GL_BUFFER_USAGE\0"
++ "GL_BUFFER_USAGE_ARB\0"
++ "GL_BYTE\0"
++ "GL_C3F_V3F\0"
++ "GL_C4F_N3F_V3F\0"
++ "GL_C4UB_V2F\0"
++ "GL_C4UB_V3F\0"
++ "GL_CCW\0"
++ "GL_CLAMP\0"
++ "GL_CLAMP_TO_BORDER\0"
++ "GL_CLAMP_TO_BORDER_ARB\0"
++ "GL_CLAMP_TO_BORDER_SGIS\0"
++ "GL_CLAMP_TO_EDGE\0"
++ "GL_CLAMP_TO_EDGE_SGIS\0"
++ "GL_CLEAR\0"
++ "GL_CLIENT_ACTIVE_TEXTURE\0"
++ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
++ "GL_CLIENT_ALL_ATTRIB_BITS\0"
++ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
++ "GL_CLIENT_PIXEL_STORE_BIT\0"
++ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
++ "GL_CLIP_PLANE0\0"
++ "GL_CLIP_PLANE1\0"
++ "GL_CLIP_PLANE2\0"
++ "GL_CLIP_PLANE3\0"
++ "GL_CLIP_PLANE4\0"
++ "GL_CLIP_PLANE5\0"
++ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
++ "GL_COEFF\0"
++ "GL_COLOR\0"
++ "GL_COLOR_ARRAY\0"
++ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
++ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_COLOR_ARRAY_POINTER\0"
++ "GL_COLOR_ARRAY_SIZE\0"
++ "GL_COLOR_ARRAY_STRIDE\0"
++ "GL_COLOR_ARRAY_TYPE\0"
++ "GL_COLOR_ATTACHMENT0_EXT\0"
++ "GL_COLOR_ATTACHMENT10_EXT\0"
++ "GL_COLOR_ATTACHMENT11_EXT\0"
++ "GL_COLOR_ATTACHMENT12_EXT\0"
++ "GL_COLOR_ATTACHMENT13_EXT\0"
++ "GL_COLOR_ATTACHMENT14_EXT\0"
++ "GL_COLOR_ATTACHMENT15_EXT\0"
++ "GL_COLOR_ATTACHMENT1_EXT\0"
++ "GL_COLOR_ATTACHMENT2_EXT\0"
++ "GL_COLOR_ATTACHMENT3_EXT\0"
++ "GL_COLOR_ATTACHMENT4_EXT\0"
++ "GL_COLOR_ATTACHMENT5_EXT\0"
++ "GL_COLOR_ATTACHMENT6_EXT\0"
++ "GL_COLOR_ATTACHMENT7_EXT\0"
++ "GL_COLOR_ATTACHMENT8_EXT\0"
++ "GL_COLOR_ATTACHMENT9_EXT\0"
++ "GL_COLOR_BUFFER_BIT\0"
++ "GL_COLOR_CLEAR_VALUE\0"
++ "GL_COLOR_INDEX\0"
++ "GL_COLOR_INDEXES\0"
++ "GL_COLOR_LOGIC_OP\0"
++ "GL_COLOR_MATERIAL\0"
++ "GL_COLOR_MATERIAL_FACE\0"
++ "GL_COLOR_MATERIAL_PARAMETER\0"
++ "GL_COLOR_MATRIX\0"
++ "GL_COLOR_MATRIX_SGI\0"
++ "GL_COLOR_MATRIX_STACK_DEPTH\0"
++ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
++ "GL_COLOR_SUM\0"
++ "GL_COLOR_SUM_ARB\0"
++ "GL_COLOR_TABLE\0"
++ "GL_COLOR_TABLE_ALPHA_SIZE\0"
++ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
++ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
++ "GL_COLOR_TABLE_BIAS\0"
++ "GL_COLOR_TABLE_BIAS_SGI\0"
++ "GL_COLOR_TABLE_BLUE_SIZE\0"
++ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
++ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
++ "GL_COLOR_TABLE_FORMAT\0"
++ "GL_COLOR_TABLE_FORMAT_EXT\0"
++ "GL_COLOR_TABLE_FORMAT_SGI\0"
++ "GL_COLOR_TABLE_GREEN_SIZE\0"
++ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
++ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
++ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
++ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
++ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
++ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
++ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
++ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
++ "GL_COLOR_TABLE_RED_SIZE\0"
++ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
++ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
++ "GL_COLOR_TABLE_SCALE\0"
++ "GL_COLOR_TABLE_SCALE_SGI\0"
++ "GL_COLOR_TABLE_WIDTH\0"
++ "GL_COLOR_TABLE_WIDTH_EXT\0"
++ "GL_COLOR_TABLE_WIDTH_SGI\0"
++ "GL_COLOR_WRITEMASK\0"
++ "GL_COMBINE\0"
++ "GL_COMBINE4\0"
++ "GL_COMBINE_ALPHA\0"
++ "GL_COMBINE_ALPHA_ARB\0"
++ "GL_COMBINE_ALPHA_EXT\0"
++ "GL_COMBINE_ARB\0"
++ "GL_COMBINE_EXT\0"
++ "GL_COMBINE_RGB\0"
++ "GL_COMBINE_RGB_ARB\0"
++ "GL_COMBINE_RGB_EXT\0"
++ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
++ "GL_COMPARE_R_TO_TEXTURE\0"
++ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
++ "GL_COMPILE\0"
++ "GL_COMPILE_AND_EXECUTE\0"
++ "GL_COMPILE_STATUS\0"
++ "GL_COMPRESSED_ALPHA\0"
++ "GL_COMPRESSED_ALPHA_ARB\0"
++ "GL_COMPRESSED_INTENSITY\0"
++ "GL_COMPRESSED_INTENSITY_ARB\0"
++ "GL_COMPRESSED_LUMINANCE\0"
++ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
++ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
++ "GL_COMPRESSED_LUMINANCE_ARB\0"
++ "GL_COMPRESSED_RGB\0"
++ "GL_COMPRESSED_RGBA\0"
++ "GL_COMPRESSED_RGBA_ARB\0"
++ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
++ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
++ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
++ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
++ "GL_COMPRESSED_RGB_ARB\0"
++ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
++ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
++ "GL_COMPRESSED_TEXTURE_FORMATS\0"
++ "GL_CONSTANT\0"
++ "GL_CONSTANT_ALPHA\0"
++ "GL_CONSTANT_ALPHA_EXT\0"
++ "GL_CONSTANT_ARB\0"
++ "GL_CONSTANT_ATTENUATION\0"
++ "GL_CONSTANT_BORDER_HP\0"
++ "GL_CONSTANT_COLOR\0"
++ "GL_CONSTANT_COLOR_EXT\0"
++ "GL_CONSTANT_EXT\0"
++ "GL_CONVOLUTION_1D\0"
++ "GL_CONVOLUTION_2D\0"
++ "GL_CONVOLUTION_BORDER_COLOR\0"
++ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
++ "GL_CONVOLUTION_BORDER_MODE\0"
++ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
++ "GL_CONVOLUTION_FILTER_BIAS\0"
++ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
++ "GL_CONVOLUTION_FILTER_SCALE\0"
++ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
++ "GL_CONVOLUTION_FORMAT\0"
++ "GL_CONVOLUTION_FORMAT_EXT\0"
++ "GL_CONVOLUTION_HEIGHT\0"
++ "GL_CONVOLUTION_HEIGHT_EXT\0"
++ "GL_CONVOLUTION_WIDTH\0"
++ "GL_CONVOLUTION_WIDTH_EXT\0"
++ "GL_COORD_REPLACE\0"
++ "GL_COORD_REPLACE_ARB\0"
++ "GL_COORD_REPLACE_NV\0"
++ "GL_COPY\0"
++ "GL_COPY_INVERTED\0"
++ "GL_COPY_PIXEL_TOKEN\0"
++ "GL_CULL_FACE\0"
++ "GL_CULL_FACE_MODE\0"
++ "GL_CULL_VERTEX_EXT\0"
++ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
++ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
++ "GL_CURRENT_ATTRIB_NV\0"
++ "GL_CURRENT_BIT\0"
++ "GL_CURRENT_COLOR\0"
++ "GL_CURRENT_FOG_COORD\0"
++ "GL_CURRENT_FOG_COORDINATE\0"
++ "GL_CURRENT_INDEX\0"
++ "GL_CURRENT_MATRIX_ARB\0"
++ "GL_CURRENT_MATRIX_INDEX_ARB\0"
++ "GL_CURRENT_MATRIX_NV\0"
++ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
++ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
++ "GL_CURRENT_NORMAL\0"
++ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
++ "GL_CURRENT_PROGRAM\0"
++ "GL_CURRENT_QUERY\0"
++ "GL_CURRENT_QUERY_ARB\0"
++ "GL_CURRENT_RASTER_COLOR\0"
++ "GL_CURRENT_RASTER_DISTANCE\0"
++ "GL_CURRENT_RASTER_INDEX\0"
++ "GL_CURRENT_RASTER_POSITION\0"
++ "GL_CURRENT_RASTER_POSITION_VALID\0"
++ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
++ "GL_CURRENT_SECONDARY_COLOR\0"
++ "GL_CURRENT_TEXTURE_COORDS\0"
++ "GL_CURRENT_VERTEX_ATTRIB\0"
++ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
++ "GL_CURRENT_WEIGHT_ARB\0"
++ "GL_CW\0"
++ "GL_DEBUG_ASSERT_MESA\0"
++ "GL_DEBUG_OBJECT_MESA\0"
++ "GL_DEBUG_PRINT_MESA\0"
++ "GL_DECAL\0"
++ "GL_DECR\0"
++ "GL_DECR_WRAP\0"
++ "GL_DECR_WRAP_EXT\0"
++ "GL_DELETE_STATUS\0"
++ "GL_DEPTH\0"
++ "GL_DEPTH_ATTACHMENT_EXT\0"
++ "GL_DEPTH_BIAS\0"
++ "GL_DEPTH_BITS\0"
++ "GL_DEPTH_BOUNDS_EXT\0"
++ "GL_DEPTH_BOUNDS_TEST_EXT\0"
++ "GL_DEPTH_BUFFER_BIT\0"
++ "GL_DEPTH_CLAMP_NV\0"
++ "GL_DEPTH_CLEAR_VALUE\0"
++ "GL_DEPTH_COMPONENT\0"
++ "GL_DEPTH_COMPONENT16\0"
++ "GL_DEPTH_COMPONENT16_ARB\0"
++ "GL_DEPTH_COMPONENT16_SGIX\0"
++ "GL_DEPTH_COMPONENT24\0"
++ "GL_DEPTH_COMPONENT24_ARB\0"
++ "GL_DEPTH_COMPONENT24_SGIX\0"
++ "GL_DEPTH_COMPONENT32\0"
++ "GL_DEPTH_COMPONENT32_ARB\0"
++ "GL_DEPTH_COMPONENT32_SGIX\0"
++ "GL_DEPTH_FUNC\0"
++ "GL_DEPTH_RANGE\0"
++ "GL_DEPTH_SCALE\0"
++ "GL_DEPTH_STENCIL_NV\0"
++ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
++ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
++ "GL_DEPTH_TEST\0"
++ "GL_DEPTH_TEXTURE_MODE\0"
++ "GL_DEPTH_TEXTURE_MODE_ARB\0"
++ "GL_DEPTH_WRITEMASK\0"
++ "GL_DIFFUSE\0"
++ "GL_DITHER\0"
++ "GL_DOMAIN\0"
++ "GL_DONT_CARE\0"
++ "GL_DOT3_RGB\0"
++ "GL_DOT3_RGBA\0"
++ "GL_DOT3_RGBA_ARB\0"
++ "GL_DOT3_RGBA_EXT\0"
++ "GL_DOT3_RGB_ARB\0"
++ "GL_DOT3_RGB_EXT\0"
++ "GL_DOUBLE\0"
++ "GL_DOUBLEBUFFER\0"
++ "GL_DRAW_BUFFER\0"
++ "GL_DRAW_BUFFER0\0"
++ "GL_DRAW_BUFFER0_ARB\0"
++ "GL_DRAW_BUFFER0_ATI\0"
++ "GL_DRAW_BUFFER1\0"
++ "GL_DRAW_BUFFER10\0"
++ "GL_DRAW_BUFFER10_ARB\0"
++ "GL_DRAW_BUFFER10_ATI\0"
++ "GL_DRAW_BUFFER11\0"
++ "GL_DRAW_BUFFER11_ARB\0"
++ "GL_DRAW_BUFFER11_ATI\0"
++ "GL_DRAW_BUFFER12\0"
++ "GL_DRAW_BUFFER12_ARB\0"
++ "GL_DRAW_BUFFER12_ATI\0"
++ "GL_DRAW_BUFFER13\0"
++ "GL_DRAW_BUFFER13_ARB\0"
++ "GL_DRAW_BUFFER13_ATI\0"
++ "GL_DRAW_BUFFER14\0"
++ "GL_DRAW_BUFFER14_ARB\0"
++ "GL_DRAW_BUFFER14_ATI\0"
++ "GL_DRAW_BUFFER15\0"
++ "GL_DRAW_BUFFER15_ARB\0"
++ "GL_DRAW_BUFFER15_ATI\0"
++ "GL_DRAW_BUFFER1_ARB\0"
++ "GL_DRAW_BUFFER1_ATI\0"
++ "GL_DRAW_BUFFER2\0"
++ "GL_DRAW_BUFFER2_ARB\0"
++ "GL_DRAW_BUFFER2_ATI\0"
++ "GL_DRAW_BUFFER3\0"
++ "GL_DRAW_BUFFER3_ARB\0"
++ "GL_DRAW_BUFFER3_ATI\0"
++ "GL_DRAW_BUFFER4\0"
++ "GL_DRAW_BUFFER4_ARB\0"
++ "GL_DRAW_BUFFER4_ATI\0"
++ "GL_DRAW_BUFFER5\0"
++ "GL_DRAW_BUFFER5_ARB\0"
++ "GL_DRAW_BUFFER5_ATI\0"
++ "GL_DRAW_BUFFER6\0"
++ "GL_DRAW_BUFFER6_ARB\0"
++ "GL_DRAW_BUFFER6_ATI\0"
++ "GL_DRAW_BUFFER7\0"
++ "GL_DRAW_BUFFER7_ARB\0"
++ "GL_DRAW_BUFFER7_ATI\0"
++ "GL_DRAW_BUFFER8\0"
++ "GL_DRAW_BUFFER8_ARB\0"
++ "GL_DRAW_BUFFER8_ATI\0"
++ "GL_DRAW_BUFFER9\0"
++ "GL_DRAW_BUFFER9_ARB\0"
++ "GL_DRAW_BUFFER9_ATI\0"
++ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
++ "GL_DRAW_FRAMEBUFFER_EXT\0"
++ "GL_DRAW_PIXEL_TOKEN\0"
++ "GL_DST_ALPHA\0"
++ "GL_DST_COLOR\0"
++ "GL_DYNAMIC_COPY\0"
++ "GL_DYNAMIC_COPY_ARB\0"
++ "GL_DYNAMIC_DRAW\0"
++ "GL_DYNAMIC_DRAW_ARB\0"
++ "GL_DYNAMIC_READ\0"
++ "GL_DYNAMIC_READ_ARB\0"
++ "GL_EDGE_FLAG\0"
++ "GL_EDGE_FLAG_ARRAY\0"
++ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
++ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_EDGE_FLAG_ARRAY_POINTER\0"
++ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
++ "GL_ELEMENT_ARRAY_BUFFER\0"
++ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
++ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
++ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_EMISSION\0"
++ "GL_ENABLE_BIT\0"
++ "GL_EQUAL\0"
++ "GL_EQUIV\0"
++ "GL_EVAL_BIT\0"
++ "GL_EXP\0"
++ "GL_EXP2\0"
++ "GL_EXTENSIONS\0"
++ "GL_EYE_LINEAR\0"
++ "GL_EYE_PLANE\0"
++ "GL_EYE_PLANE_ABSOLUTE_NV\0"
++ "GL_EYE_RADIAL_NV\0"
++ "GL_FALSE\0"
++ "GL_FASTEST\0"
++ "GL_FEEDBACK\0"
++ "GL_FEEDBACK_BUFFER_POINTER\0"
++ "GL_FEEDBACK_BUFFER_SIZE\0"
++ "GL_FEEDBACK_BUFFER_TYPE\0"
++ "GL_FILL\0"
++ "GL_FLAT\0"
++ "GL_FLOAT\0"
++ "GL_FLOAT_MAT2\0"
++ "GL_FLOAT_MAT2_ARB\0"
++ "GL_FLOAT_MAT3\0"
++ "GL_FLOAT_MAT3_ARB\0"
++ "GL_FLOAT_MAT4\0"
++ "GL_FLOAT_MAT4_ARB\0"
++ "GL_FLOAT_VEC2\0"
++ "GL_FLOAT_VEC2_ARB\0"
++ "GL_FLOAT_VEC3\0"
++ "GL_FLOAT_VEC3_ARB\0"
++ "GL_FLOAT_VEC4\0"
++ "GL_FLOAT_VEC4_ARB\0"
++ "GL_FOG\0"
++ "GL_FOG_BIT\0"
++ "GL_FOG_COLOR\0"
++ "GL_FOG_COORD\0"
++ "GL_FOG_COORDINATE\0"
++ "GL_FOG_COORDINATE_ARRAY\0"
++ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
++ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
++ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
++ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
++ "GL_FOG_COORDINATE_SOURCE\0"
++ "GL_FOG_COORD_ARRAY\0"
++ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
++ "GL_FOG_COORD_ARRAY_POINTER\0"
++ "GL_FOG_COORD_ARRAY_STRIDE\0"
++ "GL_FOG_COORD_ARRAY_TYPE\0"
++ "GL_FOG_COORD_SRC\0"
++ "GL_FOG_DENSITY\0"
++ "GL_FOG_DISTANCE_MODE_NV\0"
++ "GL_FOG_END\0"
++ "GL_FOG_HINT\0"
++ "GL_FOG_INDEX\0"
++ "GL_FOG_MODE\0"
++ "GL_FOG_OFFSET_SGIX\0"
++ "GL_FOG_OFFSET_VALUE_SGIX\0"
++ "GL_FOG_START\0"
++ "GL_FRAGMENT_DEPTH\0"
++ "GL_FRAGMENT_PROGRAM_ARB\0"
++ "GL_FRAGMENT_SHADER\0"
++ "GL_FRAGMENT_SHADER_ARB\0"
++ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
++ "GL_FRAMEBUFFER_BINDING_EXT\0"
++ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
++ "GL_FRAMEBUFFER_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
++ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
++ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
++ "GL_FRONT\0"
++ "GL_FRONT_AND_BACK\0"
++ "GL_FRONT_FACE\0"
++ "GL_FRONT_LEFT\0"
++ "GL_FRONT_RIGHT\0"
++ "GL_FUNC_ADD\0"
++ "GL_FUNC_ADD_EXT\0"
++ "GL_FUNC_REVERSE_SUBTRACT\0"
++ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
++ "GL_FUNC_SUBTRACT\0"
++ "GL_FUNC_SUBTRACT_EXT\0"
++ "GL_GENERATE_MIPMAP\0"
++ "GL_GENERATE_MIPMAP_HINT\0"
++ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
++ "GL_GENERATE_MIPMAP_SGIS\0"
++ "GL_GEQUAL\0"
++ "GL_GL_BLEND_EQUATION_RGB\0"
++ "GL_GL_COMPRESSED_SLUMINANCE\0"
++ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
++ "GL_GL_COMPRESSED_SRGB\0"
++ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
++ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
++ "GL_GL_FLOAT_MAT2x3\0"
++ "GL_GL_FLOAT_MAT2x4\0"
++ "GL_GL_FLOAT_MAT3x2\0"
++ "GL_GL_FLOAT_MAT3x4\0"
++ "GL_GL_FLOAT_MAT4x2\0"
++ "GL_GL_FLOAT_MAT4x3\0"
++ "GL_GL_PIXEL_PACK_BUFFER\0"
++ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
++ "GL_GL_PIXEL_UNPACK_BUFFER\0"
++ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
++ "GL_GL_SLUMINANCE\0"
++ "GL_GL_SLUMINANCE8\0"
++ "GL_GL_SLUMINANCE8_ALPHA8\0"
++ "GL_GL_SLUMINANCE_ALPHA\0"
++ "GL_GL_SRGB\0"
++ "GL_GL_SRGB8\0"
++ "GL_GL_SRGB8_ALPHA8\0"
++ "GL_GL_SRGB_ALPHA\0"
++ "GL_GREATER\0"
++ "GL_GREEN\0"
++ "GL_GREEN_BIAS\0"
++ "GL_GREEN_BITS\0"
++ "GL_GREEN_SCALE\0"
++ "GL_HINT_BIT\0"
++ "GL_HISTOGRAM\0"
++ "GL_HISTOGRAM_ALPHA_SIZE\0"
++ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
++ "GL_HISTOGRAM_BLUE_SIZE\0"
++ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
++ "GL_HISTOGRAM_EXT\0"
++ "GL_HISTOGRAM_FORMAT\0"
++ "GL_HISTOGRAM_FORMAT_EXT\0"
++ "GL_HISTOGRAM_GREEN_SIZE\0"
++ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
++ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
++ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
++ "GL_HISTOGRAM_RED_SIZE\0"
++ "GL_HISTOGRAM_RED_SIZE_EXT\0"
++ "GL_HISTOGRAM_SINK\0"
++ "GL_HISTOGRAM_SINK_EXT\0"
++ "GL_HISTOGRAM_WIDTH\0"
++ "GL_HISTOGRAM_WIDTH_EXT\0"
++ "GL_IDENTITY_NV\0"
++ "GL_IGNORE_BORDER_HP\0"
++ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
++ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
++ "GL_INCR\0"
++ "GL_INCR_WRAP\0"
++ "GL_INCR_WRAP_EXT\0"
++ "GL_INDEX_ARRAY\0"
++ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
++ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_INDEX_ARRAY_POINTER\0"
++ "GL_INDEX_ARRAY_STRIDE\0"
++ "GL_INDEX_ARRAY_TYPE\0"
++ "GL_INDEX_BITS\0"
++ "GL_INDEX_CLEAR_VALUE\0"
++ "GL_INDEX_LOGIC_OP\0"
++ "GL_INDEX_MODE\0"
++ "GL_INDEX_OFFSET\0"
++ "GL_INDEX_SHIFT\0"
++ "GL_INDEX_WRITEMASK\0"
++ "GL_INFO_LOG_LENGTH\0"
++ "GL_INT\0"
++ "GL_INTENSITY\0"
++ "GL_INTENSITY12\0"
++ "GL_INTENSITY12_EXT\0"
++ "GL_INTENSITY16\0"
++ "GL_INTENSITY16_EXT\0"
++ "GL_INTENSITY4\0"
++ "GL_INTENSITY4_EXT\0"
++ "GL_INTENSITY8\0"
++ "GL_INTENSITY8_EXT\0"
++ "GL_INTENSITY_EXT\0"
++ "GL_INTERPOLATE\0"
++ "GL_INTERPOLATE_ARB\0"
++ "GL_INTERPOLATE_EXT\0"
++ "GL_INT_VEC2\0"
++ "GL_INT_VEC2_ARB\0"
++ "GL_INT_VEC3\0"
++ "GL_INT_VEC3_ARB\0"
++ "GL_INT_VEC4\0"
++ "GL_INT_VEC4_ARB\0"
++ "GL_INVALID_ENUM\0"
++ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
++ "GL_INVALID_OPERATION\0"
++ "GL_INVALID_VALUE\0"
++ "GL_INVERSE_NV\0"
++ "GL_INVERSE_TRANSPOSE_NV\0"
++ "GL_INVERT\0"
++ "GL_KEEP\0"
++ "GL_LEFT\0"
++ "GL_LEQUAL\0"
++ "GL_LESS\0"
++ "GL_LIGHT0\0"
++ "GL_LIGHT1\0"
++ "GL_LIGHT2\0"
++ "GL_LIGHT3\0"
++ "GL_LIGHT4\0"
++ "GL_LIGHT5\0"
++ "GL_LIGHT6\0"
++ "GL_LIGHT7\0"
++ "GL_LIGHTING\0"
++ "GL_LIGHTING_BIT\0"
++ "GL_LIGHT_MODEL_AMBIENT\0"
++ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
++ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
++ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
++ "GL_LIGHT_MODEL_TWO_SIDE\0"
++ "GL_LINE\0"
++ "GL_LINEAR\0"
++ "GL_LINEAR_ATTENUATION\0"
++ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
++ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
++ "GL_LINEAR_MIPMAP_LINEAR\0"
++ "GL_LINEAR_MIPMAP_NEAREST\0"
++ "GL_LINES\0"
++ "GL_LINE_BIT\0"
++ "GL_LINE_LOOP\0"
++ "GL_LINE_RESET_TOKEN\0"
++ "GL_LINE_SMOOTH\0"
++ "GL_LINE_SMOOTH_HINT\0"
++ "GL_LINE_STIPPLE\0"
++ "GL_LINE_STIPPLE_PATTERN\0"
++ "GL_LINE_STIPPLE_REPEAT\0"
++ "GL_LINE_STRIP\0"
++ "GL_LINE_TOKEN\0"
++ "GL_LINE_WIDTH\0"
++ "GL_LINE_WIDTH_GRANULARITY\0"
++ "GL_LINE_WIDTH_RANGE\0"
++ "GL_LINK_STATUS\0"
++ "GL_LIST_BASE\0"
++ "GL_LIST_BIT\0"
++ "GL_LIST_INDEX\0"
++ "GL_LIST_MODE\0"
++ "GL_LOAD\0"
++ "GL_LOGIC_OP\0"
++ "GL_LOGIC_OP_MODE\0"
++ "GL_LOWER_LEFT\0"
++ "GL_LUMINANCE\0"
++ "GL_LUMINANCE12\0"
++ "GL_LUMINANCE12_ALPHA12\0"
++ "GL_LUMINANCE12_ALPHA12_EXT\0"
++ "GL_LUMINANCE12_ALPHA4\0"
++ "GL_LUMINANCE12_ALPHA4_EXT\0"
++ "GL_LUMINANCE12_EXT\0"
++ "GL_LUMINANCE16\0"
++ "GL_LUMINANCE16_ALPHA16\0"
++ "GL_LUMINANCE16_ALPHA16_EXT\0"
++ "GL_LUMINANCE16_EXT\0"
++ "GL_LUMINANCE4\0"
++ "GL_LUMINANCE4_ALPHA4\0"
++ "GL_LUMINANCE4_ALPHA4_EXT\0"
++ "GL_LUMINANCE4_EXT\0"
++ "GL_LUMINANCE6_ALPHA2\0"
++ "GL_LUMINANCE6_ALPHA2_EXT\0"
++ "GL_LUMINANCE8\0"
++ "GL_LUMINANCE8_ALPHA8\0"
++ "GL_LUMINANCE8_ALPHA8_EXT\0"
++ "GL_LUMINANCE8_EXT\0"
++ "GL_LUMINANCE_ALPHA\0"
++ "GL_MAP1_COLOR_4\0"
++ "GL_MAP1_GRID_DOMAIN\0"
++ "GL_MAP1_GRID_SEGMENTS\0"
++ "GL_MAP1_INDEX\0"
++ "GL_MAP1_NORMAL\0"
++ "GL_MAP1_TEXTURE_COORD_1\0"
++ "GL_MAP1_TEXTURE_COORD_2\0"
++ "GL_MAP1_TEXTURE_COORD_3\0"
++ "GL_MAP1_TEXTURE_COORD_4\0"
++ "GL_MAP1_VERTEX_3\0"
++ "GL_MAP1_VERTEX_4\0"
++ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
++ "GL_MAP2_COLOR_4\0"
++ "GL_MAP2_GRID_DOMAIN\0"
++ "GL_MAP2_GRID_SEGMENTS\0"
++ "GL_MAP2_INDEX\0"
++ "GL_MAP2_NORMAL\0"
++ "GL_MAP2_TEXTURE_COORD_1\0"
++ "GL_MAP2_TEXTURE_COORD_2\0"
++ "GL_MAP2_TEXTURE_COORD_3\0"
++ "GL_MAP2_TEXTURE_COORD_4\0"
++ "GL_MAP2_VERTEX_3\0"
++ "GL_MAP2_VERTEX_4\0"
++ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
++ "GL_MAP_COLOR\0"
++ "GL_MAP_STENCIL\0"
++ "GL_MATRIX0_ARB\0"
++ "GL_MATRIX0_NV\0"
++ "GL_MATRIX10_ARB\0"
++ "GL_MATRIX11_ARB\0"
++ "GL_MATRIX12_ARB\0"
++ "GL_MATRIX13_ARB\0"
++ "GL_MATRIX14_ARB\0"
++ "GL_MATRIX15_ARB\0"
++ "GL_MATRIX16_ARB\0"
++ "GL_MATRIX17_ARB\0"
++ "GL_MATRIX18_ARB\0"
++ "GL_MATRIX19_ARB\0"
++ "GL_MATRIX1_ARB\0"
++ "GL_MATRIX1_NV\0"
++ "GL_MATRIX20_ARB\0"
++ "GL_MATRIX21_ARB\0"
++ "GL_MATRIX22_ARB\0"
++ "GL_MATRIX23_ARB\0"
++ "GL_MATRIX24_ARB\0"
++ "GL_MATRIX25_ARB\0"
++ "GL_MATRIX26_ARB\0"
++ "GL_MATRIX27_ARB\0"
++ "GL_MATRIX28_ARB\0"
++ "GL_MATRIX29_ARB\0"
++ "GL_MATRIX2_ARB\0"
++ "GL_MATRIX2_NV\0"
++ "GL_MATRIX30_ARB\0"
++ "GL_MATRIX31_ARB\0"
++ "GL_MATRIX3_ARB\0"
++ "GL_MATRIX3_NV\0"
++ "GL_MATRIX4_ARB\0"
++ "GL_MATRIX4_NV\0"
++ "GL_MATRIX5_ARB\0"
++ "GL_MATRIX5_NV\0"
++ "GL_MATRIX6_ARB\0"
++ "GL_MATRIX6_NV\0"
++ "GL_MATRIX7_ARB\0"
++ "GL_MATRIX7_NV\0"
++ "GL_MATRIX8_ARB\0"
++ "GL_MATRIX9_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
++ "GL_MATRIX_MODE\0"
++ "GL_MATRIX_PALETTE_ARB\0"
++ "GL_MAX\0"
++ "GL_MAX_3D_TEXTURE_SIZE\0"
++ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
++ "GL_MAX_ATTRIB_STACK_DEPTH\0"
++ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
++ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
++ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
++ "GL_MAX_CLIP_PLANES\0"
++ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
++ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
++ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
++ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
++ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
++ "GL_MAX_CONVOLUTION_HEIGHT\0"
++ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
++ "GL_MAX_CONVOLUTION_WIDTH\0"
++ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
++ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
++ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
++ "GL_MAX_DRAW_BUFFERS\0"
++ "GL_MAX_DRAW_BUFFERS_ARB\0"
++ "GL_MAX_DRAW_BUFFERS_ATI\0"
++ "GL_MAX_ELEMENTS_INDICES\0"
++ "GL_MAX_ELEMENTS_VERTICES\0"
++ "GL_MAX_EVAL_ORDER\0"
++ "GL_MAX_EXT\0"
++ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
++ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
++ "GL_MAX_LIGHTS\0"
++ "GL_MAX_LIST_NESTING\0"
++ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
++ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
++ "GL_MAX_NAME_STACK_DEPTH\0"
++ "GL_MAX_PALETTE_MATRICES_ARB\0"
++ "GL_MAX_PIXEL_MAP_TABLE\0"
++ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
++ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
++ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
++ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
++ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
++ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
++ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
++ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
++ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
++ "GL_MAX_PROGRAM_MATRICES_ARB\0"
++ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
++ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
++ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
++ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROJECTION_STACK_DEPTH\0"
++ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
++ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
++ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
++ "GL_MAX_SHININESS_NV\0"
++ "GL_MAX_SPOT_EXPONENT_NV\0"
++ "GL_MAX_TEXTURE_COORDS\0"
++ "GL_MAX_TEXTURE_COORDS_ARB\0"
++ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
++ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
++ "GL_MAX_TEXTURE_LOD_BIAS\0"
++ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
++ "GL_MAX_TEXTURE_SIZE\0"
++ "GL_MAX_TEXTURE_STACK_DEPTH\0"
++ "GL_MAX_TEXTURE_UNITS\0"
++ "GL_MAX_TEXTURE_UNITS_ARB\0"
++ "GL_MAX_TRACK_MATRICES_NV\0"
++ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
++ "GL_MAX_VARYING_FLOATS\0"
++ "GL_MAX_VARYING_FLOATS_ARB\0"
++ "GL_MAX_VERTEX_ATTRIBS\0"
++ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
++ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
++ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
++ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
++ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
++ "GL_MAX_VERTEX_UNITS_ARB\0"
++ "GL_MAX_VIEWPORT_DIMS\0"
++ "GL_MIN\0"
++ "GL_MINMAX\0"
++ "GL_MINMAX_EXT\0"
++ "GL_MINMAX_FORMAT\0"
++ "GL_MINMAX_FORMAT_EXT\0"
++ "GL_MINMAX_SINK\0"
++ "GL_MINMAX_SINK_EXT\0"
++ "GL_MIN_EXT\0"
++ "GL_MIRRORED_REPEAT\0"
++ "GL_MIRRORED_REPEAT_ARB\0"
++ "GL_MIRRORED_REPEAT_IBM\0"
++ "GL_MIRROR_CLAMP_ATI\0"
++ "GL_MIRROR_CLAMP_EXT\0"
++ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
++ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
++ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
++ "GL_MODELVIEW\0"
++ "GL_MODELVIEW0_ARB\0"
++ "GL_MODELVIEW10_ARB\0"
++ "GL_MODELVIEW11_ARB\0"
++ "GL_MODELVIEW12_ARB\0"
++ "GL_MODELVIEW13_ARB\0"
++ "GL_MODELVIEW14_ARB\0"
++ "GL_MODELVIEW15_ARB\0"
++ "GL_MODELVIEW16_ARB\0"
++ "GL_MODELVIEW17_ARB\0"
++ "GL_MODELVIEW18_ARB\0"
++ "GL_MODELVIEW19_ARB\0"
++ "GL_MODELVIEW1_ARB\0"
++ "GL_MODELVIEW20_ARB\0"
++ "GL_MODELVIEW21_ARB\0"
++ "GL_MODELVIEW22_ARB\0"
++ "GL_MODELVIEW23_ARB\0"
++ "GL_MODELVIEW24_ARB\0"
++ "GL_MODELVIEW25_ARB\0"
++ "GL_MODELVIEW26_ARB\0"
++ "GL_MODELVIEW27_ARB\0"
++ "GL_MODELVIEW28_ARB\0"
++ "GL_MODELVIEW29_ARB\0"
++ "GL_MODELVIEW2_ARB\0"
++ "GL_MODELVIEW30_ARB\0"
++ "GL_MODELVIEW31_ARB\0"
++ "GL_MODELVIEW3_ARB\0"
++ "GL_MODELVIEW4_ARB\0"
++ "GL_MODELVIEW5_ARB\0"
++ "GL_MODELVIEW6_ARB\0"
++ "GL_MODELVIEW7_ARB\0"
++ "GL_MODELVIEW8_ARB\0"
++ "GL_MODELVIEW9_ARB\0"
++ "GL_MODELVIEW_MATRIX\0"
++ "GL_MODELVIEW_PROJECTION_NV\0"
++ "GL_MODELVIEW_STACK_DEPTH\0"
++ "GL_MODULATE\0"
++ "GL_MODULATE_ADD_ATI\0"
++ "GL_MODULATE_SIGNED_ADD_ATI\0"
++ "GL_MODULATE_SUBTRACT_ATI\0"
++ "GL_MULT\0"
++ "GL_MULTISAMPLE\0"
++ "GL_MULTISAMPLE_3DFX\0"
++ "GL_MULTISAMPLE_ARB\0"
++ "GL_MULTISAMPLE_BIT\0"
++ "GL_MULTISAMPLE_BIT_3DFX\0"
++ "GL_MULTISAMPLE_BIT_ARB\0"
++ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
++ "GL_N3F_V3F\0"
++ "GL_NAME_STACK_DEPTH\0"
++ "GL_NAND\0"
++ "GL_NEAREST\0"
++ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
++ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
++ "GL_NEAREST_MIPMAP_LINEAR\0"
++ "GL_NEAREST_MIPMAP_NEAREST\0"
++ "GL_NEVER\0"
++ "GL_NICEST\0"
++ "GL_NONE\0"
++ "GL_NOOP\0"
++ "GL_NOR\0"
++ "GL_NORMALIZE\0"
++ "GL_NORMAL_ARRAY\0"
++ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
++ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_NORMAL_ARRAY_POINTER\0"
++ "GL_NORMAL_ARRAY_STRIDE\0"
++ "GL_NORMAL_ARRAY_TYPE\0"
++ "GL_NORMAL_MAP\0"
++ "GL_NORMAL_MAP_ARB\0"
++ "GL_NORMAL_MAP_NV\0"
++ "GL_NOTEQUAL\0"
++ "GL_NO_ERROR\0"
++ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
++ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
++ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
++ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
++ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
++ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
++ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
++ "GL_OBJECT_COMPILE_STATUS_ARB\0"
++ "GL_OBJECT_DELETE_STATUS_ARB\0"
++ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
++ "GL_OBJECT_LINEAR\0"
++ "GL_OBJECT_LINK_STATUS_ARB\0"
++ "GL_OBJECT_PLANE\0"
++ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
++ "GL_OBJECT_SUBTYPE_ARB\0"
++ "GL_OBJECT_TYPE_ARB\0"
++ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
++ "GL_OCCLUSION_TEST_HP\0"
++ "GL_OCCLUSION_TEST_RESULT_HP\0"
++ "GL_ONE\0"
++ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
++ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
++ "GL_ONE_MINUS_CONSTANT_COLOR\0"
++ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
++ "GL_ONE_MINUS_DST_ALPHA\0"
++ "GL_ONE_MINUS_DST_COLOR\0"
++ "GL_ONE_MINUS_SRC_ALPHA\0"
++ "GL_ONE_MINUS_SRC_COLOR\0"
++ "GL_OPERAND0_ALPHA\0"
++ "GL_OPERAND0_ALPHA_ARB\0"
++ "GL_OPERAND0_ALPHA_EXT\0"
++ "GL_OPERAND0_RGB\0"
++ "GL_OPERAND0_RGB_ARB\0"
++ "GL_OPERAND0_RGB_EXT\0"
++ "GL_OPERAND1_ALPHA\0"
++ "GL_OPERAND1_ALPHA_ARB\0"
++ "GL_OPERAND1_ALPHA_EXT\0"
++ "GL_OPERAND1_RGB\0"
++ "GL_OPERAND1_RGB_ARB\0"
++ "GL_OPERAND1_RGB_EXT\0"
++ "GL_OPERAND2_ALPHA\0"
++ "GL_OPERAND2_ALPHA_ARB\0"
++ "GL_OPERAND2_ALPHA_EXT\0"
++ "GL_OPERAND2_RGB\0"
++ "GL_OPERAND2_RGB_ARB\0"
++ "GL_OPERAND2_RGB_EXT\0"
++ "GL_OPERAND3_ALPHA_NV\0"
++ "GL_OPERAND3_RGB_NV\0"
++ "GL_OR\0"
++ "GL_ORDER\0"
++ "GL_OR_INVERTED\0"
++ "GL_OR_REVERSE\0"
++ "GL_OUT_OF_MEMORY\0"
++ "GL_PACK_ALIGNMENT\0"
++ "GL_PACK_IMAGE_HEIGHT\0"
++ "GL_PACK_INVERT_MESA\0"
++ "GL_PACK_LSB_FIRST\0"
++ "GL_PACK_ROW_LENGTH\0"
++ "GL_PACK_SKIP_IMAGES\0"
++ "GL_PACK_SKIP_PIXELS\0"
++ "GL_PACK_SKIP_ROWS\0"
++ "GL_PACK_SWAP_BYTES\0"
++ "GL_PALETTE4_R5_G6_B5_OES\0"
++ "GL_PALETTE4_RGB5_A1_OES\0"
++ "GL_PALETTE4_RGB8_OES\0"
++ "GL_PALETTE4_RGBA4_OES\0"
++ "GL_PALETTE4_RGBA8_OES\0"
++ "GL_PALETTE8_R5_G6_B5_OES\0"
++ "GL_PALETTE8_RGB5_A1_OES\0"
++ "GL_PALETTE8_RGB8_OES\0"
++ "GL_PALETTE8_RGBA4_OES\0"
++ "GL_PALETTE8_RGBA8_OES\0"
++ "GL_PASS_THROUGH_TOKEN\0"
++ "GL_PERSPECTIVE_CORRECTION_HINT\0"
++ "GL_PIXEL_MAP_A_TO_A\0"
++ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
++ "GL_PIXEL_MAP_B_TO_B\0"
++ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
++ "GL_PIXEL_MAP_G_TO_G\0"
++ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_A\0"
++ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_B\0"
++ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_G\0"
++ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_I\0"
++ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_R\0"
++ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
++ "GL_PIXEL_MAP_R_TO_R\0"
++ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
++ "GL_PIXEL_MAP_S_TO_S\0"
++ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
++ "GL_PIXEL_MODE_BIT\0"
++ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
++ "GL_PIXEL_PACK_BUFFER_EXT\0"
++ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
++ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
++ "GL_POINT\0"
++ "GL_POINTS\0"
++ "GL_POINT_BIT\0"
++ "GL_POINT_DISTANCE_ATTENUATION\0"
++ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
++ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
++ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
++ "GL_POINT_FADE_THRESHOLD_SIZE\0"
++ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
++ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
++ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
++ "GL_POINT_SIZE\0"
++ "GL_POINT_SIZE_GRANULARITY\0"
++ "GL_POINT_SIZE_MAX\0"
++ "GL_POINT_SIZE_MAX_ARB\0"
++ "GL_POINT_SIZE_MAX_EXT\0"
++ "GL_POINT_SIZE_MAX_SGIS\0"
++ "GL_POINT_SIZE_MIN\0"
++ "GL_POINT_SIZE_MIN_ARB\0"
++ "GL_POINT_SIZE_MIN_EXT\0"
++ "GL_POINT_SIZE_MIN_SGIS\0"
++ "GL_POINT_SIZE_RANGE\0"
++ "GL_POINT_SMOOTH\0"
++ "GL_POINT_SMOOTH_HINT\0"
++ "GL_POINT_SPRITE\0"
++ "GL_POINT_SPRITE_ARB\0"
++ "GL_POINT_SPRITE_COORD_ORIGIN\0"
++ "GL_POINT_SPRITE_NV\0"
++ "GL_POINT_SPRITE_R_MODE_NV\0"
++ "GL_POINT_TOKEN\0"
++ "GL_POLYGON\0"
++ "GL_POLYGON_BIT\0"
++ "GL_POLYGON_MODE\0"
++ "GL_POLYGON_OFFSET_BIAS\0"
++ "GL_POLYGON_OFFSET_FACTOR\0"
++ "GL_POLYGON_OFFSET_FILL\0"
++ "GL_POLYGON_OFFSET_LINE\0"
++ "GL_POLYGON_OFFSET_POINT\0"
++ "GL_POLYGON_OFFSET_UNITS\0"
++ "GL_POLYGON_SMOOTH\0"
++ "GL_POLYGON_SMOOTH_HINT\0"
++ "GL_POLYGON_STIPPLE\0"
++ "GL_POLYGON_STIPPLE_BIT\0"
++ "GL_POLYGON_TOKEN\0"
++ "GL_POSITION\0"
++ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
++ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
++ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
++ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
++ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
++ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
++ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
++ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
++ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
++ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
++ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
++ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
++ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
++ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
++ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
++ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
++ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
++ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
++ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
++ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
++ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
++ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
++ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
++ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
++ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
++ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
++ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
++ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
++ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
++ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
++ "GL_POST_CONVOLUTION_RED_BIAS\0"
++ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
++ "GL_POST_CONVOLUTION_RED_SCALE\0"
++ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
++ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
++ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
++ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
++ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
++ "GL_PREVIOUS\0"
++ "GL_PREVIOUS_ARB\0"
++ "GL_PREVIOUS_EXT\0"
++ "GL_PRIMARY_COLOR\0"
++ "GL_PRIMARY_COLOR_ARB\0"
++ "GL_PRIMARY_COLOR_EXT\0"
++ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
++ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_ATTRIBS_ARB\0"
++ "GL_PROGRAM_BINDING_ARB\0"
++ "GL_PROGRAM_ERROR_POSITION_ARB\0"
++ "GL_PROGRAM_ERROR_POSITION_NV\0"
++ "GL_PROGRAM_ERROR_STRING_ARB\0"
++ "GL_PROGRAM_FORMAT_ARB\0"
++ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
++ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_LENGTH_ARB\0"
++ "GL_PROGRAM_LENGTH_NV\0"
++ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
++ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
++ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
++ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
++ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
++ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_OBJECT_ARB\0"
++ "GL_PROGRAM_PARAMETERS_ARB\0"
++ "GL_PROGRAM_PARAMETER_NV\0"
++ "GL_PROGRAM_RESIDENT_NV\0"
++ "GL_PROGRAM_STRING_ARB\0"
++ "GL_PROGRAM_STRING_NV\0"
++ "GL_PROGRAM_TARGET_NV\0"
++ "GL_PROGRAM_TEMPORARIES_ARB\0"
++ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
++ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
++ "GL_PROJECTION\0"
++ "GL_PROJECTION_MATRIX\0"
++ "GL_PROJECTION_STACK_DEPTH\0"
++ "GL_PROXY_COLOR_TABLE\0"
++ "GL_PROXY_HISTOGRAM\0"
++ "GL_PROXY_HISTOGRAM_EXT\0"
++ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
++ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
++ "GL_PROXY_TEXTURE_1D\0"
++ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
++ "GL_PROXY_TEXTURE_1D_EXT\0"
++ "GL_PROXY_TEXTURE_2D\0"
++ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
++ "GL_PROXY_TEXTURE_2D_EXT\0"
++ "GL_PROXY_TEXTURE_3D\0"
++ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
++ "GL_PROXY_TEXTURE_CUBE_MAP\0"
++ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
++ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
++ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
++ "GL_Q\0"
++ "GL_QUADRATIC_ATTENUATION\0"
++ "GL_QUADS\0"
++ "GL_QUAD_MESH_SUN\0"
++ "GL_QUAD_STRIP\0"
++ "GL_QUERY_COUNTER_BITS\0"
++ "GL_QUERY_COUNTER_BITS_ARB\0"
++ "GL_QUERY_RESULT\0"
++ "GL_QUERY_RESULT_ARB\0"
++ "GL_QUERY_RESULT_AVAILABLE\0"
++ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
++ "GL_R\0"
++ "GL_R3_G3_B2\0"
++ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
++ "GL_READ_BUFFER\0"
++ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
++ "GL_READ_FRAMEBUFFER_EXT\0"
++ "GL_READ_ONLY\0"
++ "GL_READ_ONLY_ARB\0"
++ "GL_READ_WRITE\0"
++ "GL_READ_WRITE_ARB\0"
++ "GL_RED\0"
++ "GL_REDUCE\0"
++ "GL_REDUCE_EXT\0"
++ "GL_RED_BIAS\0"
++ "GL_RED_BITS\0"
++ "GL_RED_SCALE\0"
++ "GL_REFLECTION_MAP\0"
++ "GL_REFLECTION_MAP_ARB\0"
++ "GL_REFLECTION_MAP_NV\0"
++ "GL_RENDER\0"
++ "GL_RENDERBUFFER_BINDING_EXT\0"
++ "GL_RENDERBUFFER_EXT\0"
++ "GL_RENDERBUFFER_HEIGHT_EXT\0"
++ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
++ "GL_RENDERBUFFER_WIDTH_EXT\0"
++ "GL_RENDERER\0"
++ "GL_RENDER_MODE\0"
++ "GL_REPEAT\0"
++ "GL_REPLACE\0"
++ "GL_REPLACE_EXT\0"
++ "GL_REPLICATE_BORDER_HP\0"
++ "GL_RESCALE_NORMAL\0"
++ "GL_RESCALE_NORMAL_EXT\0"
++ "GL_RETURN\0"
++ "GL_RGB\0"
++ "GL_RGB10\0"
++ "GL_RGB10_A2\0"
++ "GL_RGB10_A2_EXT\0"
++ "GL_RGB10_EXT\0"
++ "GL_RGB12\0"
++ "GL_RGB12_EXT\0"
++ "GL_RGB16\0"
++ "GL_RGB16_EXT\0"
++ "GL_RGB2_EXT\0"
++ "GL_RGB4\0"
++ "GL_RGB4_EXT\0"
++ "GL_RGB4_S3TC\0"
++ "GL_RGB5\0"
++ "GL_RGB5_A1\0"
++ "GL_RGB5_A1_EXT\0"
++ "GL_RGB5_EXT\0"
++ "GL_RGB8\0"
++ "GL_RGB8_EXT\0"
++ "GL_RGBA\0"
++ "GL_RGBA12\0"
++ "GL_RGBA12_EXT\0"
++ "GL_RGBA16\0"
++ "GL_RGBA16_EXT\0"
++ "GL_RGBA2\0"
++ "GL_RGBA2_EXT\0"
++ "GL_RGBA4\0"
++ "GL_RGBA4_DXT5_S3TC\0"
++ "GL_RGBA4_EXT\0"
++ "GL_RGBA4_S3TC\0"
++ "GL_RGBA8\0"
++ "GL_RGBA8_EXT\0"
++ "GL_RGBA_DXT5_S3TC\0"
++ "GL_RGBA_MODE\0"
++ "GL_RGBA_S3TC\0"
++ "GL_RGB_S3TC\0"
++ "GL_RGB_SCALE\0"
++ "GL_RGB_SCALE_ARB\0"
++ "GL_RGB_SCALE_EXT\0"
++ "GL_RIGHT\0"
++ "GL_S\0"
++ "GL_SAMPLER_1D\0"
++ "GL_SAMPLER_1D_SHADOW\0"
++ "GL_SAMPLER_2D\0"
++ "GL_SAMPLER_2D_SHADOW\0"
++ "GL_SAMPLER_3D\0"
++ "GL_SAMPLER_CUBE\0"
++ "GL_SAMPLES\0"
++ "GL_SAMPLES_3DFX\0"
++ "GL_SAMPLES_ARB\0"
++ "GL_SAMPLES_PASSED\0"
++ "GL_SAMPLES_PASSED_ARB\0"
++ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
++ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
++ "GL_SAMPLE_ALPHA_TO_ONE\0"
++ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
++ "GL_SAMPLE_BUFFERS\0"
++ "GL_SAMPLE_BUFFERS_3DFX\0"
++ "GL_SAMPLE_BUFFERS_ARB\0"
++ "GL_SAMPLE_COVERAGE\0"
++ "GL_SAMPLE_COVERAGE_ARB\0"
++ "GL_SAMPLE_COVERAGE_INVERT\0"
++ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
++ "GL_SAMPLE_COVERAGE_VALUE\0"
++ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
++ "GL_SCISSOR_BIT\0"
++ "GL_SCISSOR_BOX\0"
++ "GL_SCISSOR_TEST\0"
++ "GL_SECONDARY_COLOR_ARRAY\0"
++ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
++ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
++ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
++ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
++ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
++ "GL_SELECT\0"
++ "GL_SELECTION_BUFFER_POINTER\0"
++ "GL_SELECTION_BUFFER_SIZE\0"
++ "GL_SEPARABLE_2D\0"
++ "GL_SEPARATE_SPECULAR_COLOR\0"
++ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
++ "GL_SET\0"
++ "GL_SHADER_OBJECT_ARB\0"
++ "GL_SHADER_SOURCE_LENGTH\0"
++ "GL_SHADER_TYPE\0"
++ "GL_SHADE_MODEL\0"
++ "GL_SHADING_LANGUAGE_VERSION\0"
++ "GL_SHADOW_AMBIENT_SGIX\0"
++ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
++ "GL_SHININESS\0"
++ "GL_SHORT\0"
++ "GL_SINGLE_COLOR\0"
++ "GL_SINGLE_COLOR_EXT\0"
++ "GL_SLICE_ACCUM_SUN\0"
++ "GL_SMOOTH\0"
++ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
++ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
++ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
++ "GL_SMOOTH_POINT_SIZE_RANGE\0"
++ "GL_SOURCE0_ALPHA\0"
++ "GL_SOURCE0_ALPHA_ARB\0"
++ "GL_SOURCE0_ALPHA_EXT\0"
++ "GL_SOURCE0_RGB\0"
++ "GL_SOURCE0_RGB_ARB\0"
++ "GL_SOURCE0_RGB_EXT\0"
++ "GL_SOURCE1_ALPHA\0"
++ "GL_SOURCE1_ALPHA_ARB\0"
++ "GL_SOURCE1_ALPHA_EXT\0"
++ "GL_SOURCE1_RGB\0"
++ "GL_SOURCE1_RGB_ARB\0"
++ "GL_SOURCE1_RGB_EXT\0"
++ "GL_SOURCE2_ALPHA\0"
++ "GL_SOURCE2_ALPHA_ARB\0"
++ "GL_SOURCE2_ALPHA_EXT\0"
++ "GL_SOURCE2_RGB\0"
++ "GL_SOURCE2_RGB_ARB\0"
++ "GL_SOURCE2_RGB_EXT\0"
++ "GL_SOURCE3_ALPHA_NV\0"
++ "GL_SOURCE3_RGB_NV\0"
++ "GL_SPECULAR\0"
++ "GL_SPHERE_MAP\0"
++ "GL_SPOT_CUTOFF\0"
++ "GL_SPOT_DIRECTION\0"
++ "GL_SPOT_EXPONENT\0"
++ "GL_SRC0_ALPHA\0"
++ "GL_SRC0_RGB\0"
++ "GL_SRC1_ALPHA\0"
++ "GL_SRC1_RGB\0"
++ "GL_SRC2_ALPHA\0"
++ "GL_SRC2_RGB\0"
++ "GL_SRC_ALPHA\0"
++ "GL_SRC_ALPHA_SATURATE\0"
++ "GL_SRC_COLOR\0"
++ "GL_STACK_OVERFLOW\0"
++ "GL_STACK_UNDERFLOW\0"
++ "GL_STATIC_COPY\0"
++ "GL_STATIC_COPY_ARB\0"
++ "GL_STATIC_DRAW\0"
++ "GL_STATIC_DRAW_ARB\0"
++ "GL_STATIC_READ\0"
++ "GL_STATIC_READ_ARB\0"
++ "GL_STENCIL\0"
++ "GL_STENCIL_ATTACHMENT_EXT\0"
++ "GL_STENCIL_BACK_FAIL\0"
++ "GL_STENCIL_BACK_FUNC\0"
++ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
++ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
++ "GL_STENCIL_BACK_REF\0"
++ "GL_STENCIL_BACK_VALUE_MASK\0"
++ "GL_STENCIL_BACK_WRITEMASK\0"
++ "GL_STENCIL_BITS\0"
++ "GL_STENCIL_BUFFER_BIT\0"
++ "GL_STENCIL_CLEAR_VALUE\0"
++ "GL_STENCIL_FAIL\0"
++ "GL_STENCIL_FUNC\0"
++ "GL_STENCIL_INDEX\0"
++ "GL_STENCIL_INDEX16_EXT\0"
++ "GL_STENCIL_INDEX1_EXT\0"
++ "GL_STENCIL_INDEX4_EXT\0"
++ "GL_STENCIL_INDEX8_EXT\0"
++ "GL_STENCIL_INDEX_EXT\0"
++ "GL_STENCIL_PASS_DEPTH_FAIL\0"
++ "GL_STENCIL_PASS_DEPTH_PASS\0"
++ "GL_STENCIL_REF\0"
++ "GL_STENCIL_TEST\0"
++ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
++ "GL_STENCIL_VALUE_MASK\0"
++ "GL_STENCIL_WRITEMASK\0"
++ "GL_STEREO\0"
++ "GL_STREAM_COPY\0"
++ "GL_STREAM_COPY_ARB\0"
++ "GL_STREAM_DRAW\0"
++ "GL_STREAM_DRAW_ARB\0"
++ "GL_STREAM_READ\0"
++ "GL_STREAM_READ_ARB\0"
++ "GL_SUBPIXEL_BITS\0"
++ "GL_SUBTRACT\0"
++ "GL_SUBTRACT_ARB\0"
++ "GL_T\0"
++ "GL_T2F_C3F_V3F\0"
++ "GL_T2F_C4F_N3F_V3F\0"
++ "GL_T2F_C4UB_V3F\0"
++ "GL_T2F_N3F_V3F\0"
++ "GL_T2F_V3F\0"
++ "GL_T4F_C4F_N3F_V4F\0"
++ "GL_T4F_V4F\0"
++ "GL_TABLE_TOO_LARGE_EXT\0"
++ "GL_TEXTURE\0"
++ "GL_TEXTURE0\0"
++ "GL_TEXTURE0_ARB\0"
++ "GL_TEXTURE1\0"
++ "GL_TEXTURE10\0"
++ "GL_TEXTURE10_ARB\0"
++ "GL_TEXTURE11\0"
++ "GL_TEXTURE11_ARB\0"
++ "GL_TEXTURE12\0"
++ "GL_TEXTURE12_ARB\0"
++ "GL_TEXTURE13\0"
++ "GL_TEXTURE13_ARB\0"
++ "GL_TEXTURE14\0"
++ "GL_TEXTURE14_ARB\0"
++ "GL_TEXTURE15\0"
++ "GL_TEXTURE15_ARB\0"
++ "GL_TEXTURE16\0"
++ "GL_TEXTURE16_ARB\0"
++ "GL_TEXTURE17\0"
++ "GL_TEXTURE17_ARB\0"
++ "GL_TEXTURE18\0"
++ "GL_TEXTURE18_ARB\0"
++ "GL_TEXTURE19\0"
++ "GL_TEXTURE19_ARB\0"
++ "GL_TEXTURE1_ARB\0"
++ "GL_TEXTURE2\0"
++ "GL_TEXTURE20\0"
++ "GL_TEXTURE20_ARB\0"
++ "GL_TEXTURE21\0"
++ "GL_TEXTURE21_ARB\0"
++ "GL_TEXTURE22\0"
++ "GL_TEXTURE22_ARB\0"
++ "GL_TEXTURE23\0"
++ "GL_TEXTURE23_ARB\0"
++ "GL_TEXTURE24\0"
++ "GL_TEXTURE24_ARB\0"
++ "GL_TEXTURE25\0"
++ "GL_TEXTURE25_ARB\0"
++ "GL_TEXTURE26\0"
++ "GL_TEXTURE26_ARB\0"
++ "GL_TEXTURE27\0"
++ "GL_TEXTURE27_ARB\0"
++ "GL_TEXTURE28\0"
++ "GL_TEXTURE28_ARB\0"
++ "GL_TEXTURE29\0"
++ "GL_TEXTURE29_ARB\0"
++ "GL_TEXTURE2_ARB\0"
++ "GL_TEXTURE3\0"
++ "GL_TEXTURE30\0"
++ "GL_TEXTURE30_ARB\0"
++ "GL_TEXTURE31\0"
++ "GL_TEXTURE31_ARB\0"
++ "GL_TEXTURE3_ARB\0"
++ "GL_TEXTURE4\0"
++ "GL_TEXTURE4_ARB\0"
++ "GL_TEXTURE5\0"
++ "GL_TEXTURE5_ARB\0"
++ "GL_TEXTURE6\0"
++ "GL_TEXTURE6_ARB\0"
++ "GL_TEXTURE7\0"
++ "GL_TEXTURE7_ARB\0"
++ "GL_TEXTURE8\0"
++ "GL_TEXTURE8_ARB\0"
++ "GL_TEXTURE9\0"
++ "GL_TEXTURE9_ARB\0"
++ "GL_TEXTURE_1D\0"
++ "GL_TEXTURE_1D_ARRAY_EXT\0"
++ "GL_TEXTURE_2D\0"
++ "GL_TEXTURE_2D_ARRAY_EXT\0"
++ "GL_TEXTURE_3D\0"
++ "GL_TEXTURE_ALPHA_SIZE\0"
++ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
++ "GL_TEXTURE_BASE_LEVEL\0"
++ "GL_TEXTURE_BINDING_1D\0"
++ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
++ "GL_TEXTURE_BINDING_2D\0"
++ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
++ "GL_TEXTURE_BINDING_3D\0"
++ "GL_TEXTURE_BINDING_CUBE_MAP\0"
++ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
++ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
++ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
++ "GL_TEXTURE_BIT\0"
++ "GL_TEXTURE_BLUE_SIZE\0"
++ "GL_TEXTURE_BLUE_SIZE_EXT\0"
++ "GL_TEXTURE_BORDER\0"
++ "GL_TEXTURE_BORDER_COLOR\0"
++ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
++ "GL_TEXTURE_COLOR_TABLE_SGI\0"
++ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
++ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
++ "GL_TEXTURE_COMPARE_FUNC\0"
++ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
++ "GL_TEXTURE_COMPARE_MODE\0"
++ "GL_TEXTURE_COMPARE_MODE_ARB\0"
++ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
++ "GL_TEXTURE_COMPARE_SGIX\0"
++ "GL_TEXTURE_COMPONENTS\0"
++ "GL_TEXTURE_COMPRESSED\0"
++ "GL_TEXTURE_COMPRESSED_ARB\0"
++ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
++ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
++ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
++ "GL_TEXTURE_COMPRESSION_HINT\0"
++ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
++ "GL_TEXTURE_COORD_ARRAY\0"
++ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
++ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
++ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
++ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
++ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
++ "GL_TEXTURE_CUBE_MAP\0"
++ "GL_TEXTURE_CUBE_MAP_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
++ "GL_TEXTURE_DEPTH\0"
++ "GL_TEXTURE_DEPTH_SIZE\0"
++ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
++ "GL_TEXTURE_ENV\0"
++ "GL_TEXTURE_ENV_COLOR\0"
++ "GL_TEXTURE_ENV_MODE\0"
++ "GL_TEXTURE_FILTER_CONTROL\0"
++ "GL_TEXTURE_GEN_MODE\0"
++ "GL_TEXTURE_GEN_Q\0"
++ "GL_TEXTURE_GEN_R\0"
++ "GL_TEXTURE_GEN_S\0"
++ "GL_TEXTURE_GEN_T\0"
++ "GL_TEXTURE_GEQUAL_R_SGIX\0"
++ "GL_TEXTURE_GREEN_SIZE\0"
++ "GL_TEXTURE_GREEN_SIZE_EXT\0"
++ "GL_TEXTURE_HEIGHT\0"
++ "GL_TEXTURE_INDEX_SIZE_EXT\0"
++ "GL_TEXTURE_INTENSITY_SIZE\0"
++ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
++ "GL_TEXTURE_INTERNAL_FORMAT\0"
++ "GL_TEXTURE_LEQUAL_R_SGIX\0"
++ "GL_TEXTURE_LOD_BIAS\0"
++ "GL_TEXTURE_LOD_BIAS_EXT\0"
++ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
++ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
++ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
++ "GL_TEXTURE_LUMINANCE_SIZE\0"
++ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
++ "GL_TEXTURE_MAG_FILTER\0"
++ "GL_TEXTURE_MATRIX\0"
++ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
++ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
++ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
++ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
++ "GL_TEXTURE_MAX_LEVEL\0"
++ "GL_TEXTURE_MAX_LOD\0"
++ "GL_TEXTURE_MIN_FILTER\0"
++ "GL_TEXTURE_MIN_LOD\0"
++ "GL_TEXTURE_PRIORITY\0"
++ "GL_TEXTURE_RECTANGLE_ARB\0"
++ "GL_TEXTURE_RECTANGLE_NV\0"
++ "GL_TEXTURE_RED_SIZE\0"
++ "GL_TEXTURE_RED_SIZE_EXT\0"
++ "GL_TEXTURE_RESIDENT\0"
++ "GL_TEXTURE_STACK_DEPTH\0"
++ "GL_TEXTURE_TOO_LARGE_EXT\0"
++ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
++ "GL_TEXTURE_WIDTH\0"
++ "GL_TEXTURE_WRAP_R\0"
++ "GL_TEXTURE_WRAP_S\0"
++ "GL_TEXTURE_WRAP_T\0"
++ "GL_TIME_ELAPSED_EXT\0"
++ "GL_TRACK_MATRIX_NV\0"
++ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
++ "GL_TRANSFORM_BIT\0"
++ "GL_TRANSPOSE_COLOR_MATRIX\0"
++ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
++ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
++ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
++ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
++ "GL_TRANSPOSE_NV\0"
++ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
++ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
++ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
++ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
++ "GL_TRIANGLES\0"
++ "GL_TRIANGLE_FAN\0"
++ "GL_TRIANGLE_MESH_SUN\0"
++ "GL_TRIANGLE_STRIP\0"
++ "GL_TRUE\0"
++ "GL_UNPACK_ALIGNMENT\0"
++ "GL_UNPACK_IMAGE_HEIGHT\0"
++ "GL_UNPACK_LSB_FIRST\0"
++ "GL_UNPACK_ROW_LENGTH\0"
++ "GL_UNPACK_SKIP_IMAGES\0"
++ "GL_UNPACK_SKIP_PIXELS\0"
++ "GL_UNPACK_SKIP_ROWS\0"
++ "GL_UNPACK_SWAP_BYTES\0"
++ "GL_UNSIGNED_BYTE\0"
++ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
++ "GL_UNSIGNED_BYTE_3_3_2\0"
++ "GL_UNSIGNED_INT\0"
++ "GL_UNSIGNED_INT_10_10_10_2\0"
++ "GL_UNSIGNED_INT_24_8_NV\0"
++ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
++ "GL_UNSIGNED_INT_8_8_8_8\0"
++ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
++ "GL_UNSIGNED_SHORT\0"
++ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
++ "GL_UNSIGNED_SHORT_4_4_4_4\0"
++ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
++ "GL_UNSIGNED_SHORT_5_5_5_1\0"
++ "GL_UNSIGNED_SHORT_5_6_5\0"
++ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
++ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
++ "GL_UNSIGNED_SHORT_8_8_MESA\0"
++ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
++ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
++ "GL_UPPER_LEFT\0"
++ "GL_V2F\0"
++ "GL_V3F\0"
++ "GL_VALIDATE_STATUS\0"
++ "GL_VENDOR\0"
++ "GL_VERSION\0"
++ "GL_VERTEX_ARRAY\0"
++ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
++ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
++ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_VERTEX_ARRAY_POINTER\0"
++ "GL_VERTEX_ARRAY_SIZE\0"
++ "GL_VERTEX_ARRAY_STRIDE\0"
++ "GL_VERTEX_ARRAY_TYPE\0"
++ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
++ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
++ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
++ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
++ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
++ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
++ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
++ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
++ "GL_VERTEX_BLEND_ARB\0"
++ "GL_VERTEX_PROGRAM_ARB\0"
++ "GL_VERTEX_PROGRAM_BINDING_NV\0"
++ "GL_VERTEX_PROGRAM_NV\0"
++ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
++ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
++ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
++ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
++ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
++ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
++ "GL_VERTEX_SHADER\0"
++ "GL_VERTEX_SHADER_ARB\0"
++ "GL_VERTEX_STATE_PROGRAM_NV\0"
++ "GL_VIEWPORT\0"
++ "GL_VIEWPORT_BIT\0"
++ "GL_WEIGHT_ARRAY_ARB\0"
++ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
++ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
++ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
++ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
++ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
++ "GL_WEIGHT_SUM_UNITY_ARB\0"
++ "GL_WRAP_BORDER_SUN\0"
++ "GL_WRITE_ONLY\0"
++ "GL_WRITE_ONLY_ARB\0"
++ "GL_XOR\0"
++ "GL_YCBCR_422_APPLE\0"
++ "GL_YCBCR_MESA\0"
++ "GL_ZERO\0"
++ "GL_ZOOM_X\0"
++ "GL_ZOOM_Y\0"
++ ;
++
++static const enum_elt all_enums[1746] =
++{
++ { 0, 0x00000600 }, /* GL_2D */
++ { 6, 0x00001407 }, /* GL_2_BYTES */
++ { 17, 0x00000601 }, /* GL_3D */
++ { 23, 0x00000602 }, /* GL_3D_COLOR */
++ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
++ { 55, 0x00001408 }, /* GL_3_BYTES */
++ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
++ { 86, 0x00001409 }, /* GL_4_BYTES */
++ { 97, 0x00000100 }, /* GL_ACCUM */
++ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
++ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
++ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
++ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
++ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
++ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
++ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
++ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
++ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
++ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
++ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
++ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
++ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
++ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
++ { 418, 0x00000104 }, /* GL_ADD */
++ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
++ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
++ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
++ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
++ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
++ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
++ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
++ { 576, 0x00001906 }, /* GL_ALPHA */
++ { 585, 0x0000803D }, /* GL_ALPHA12 */
++ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
++ { 611, 0x0000803E }, /* GL_ALPHA16 */
++ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
++ { 637, 0x0000803B }, /* GL_ALPHA4 */
++ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
++ { 661, 0x0000803C }, /* GL_ALPHA8 */
++ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
++ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
++ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
++ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
++ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
++ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
++ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
++ { 779, 0x00000207 }, /* GL_ALWAYS */
++ { 789, 0x00001200 }, /* GL_AMBIENT */
++ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
++ { 823, 0x00001501 }, /* GL_AND */
++ { 830, 0x00001504 }, /* GL_AND_INVERTED */
++ { 846, 0x00001502 }, /* GL_AND_REVERSE */
++ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
++ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
++ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
++ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
++ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
++ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
++ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
++ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
++ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
++ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
++ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
++ { 1107, 0x00000409 }, /* GL_AUX0 */
++ { 1115, 0x0000040A }, /* GL_AUX1 */
++ { 1123, 0x0000040B }, /* GL_AUX2 */
++ { 1131, 0x0000040C }, /* GL_AUX3 */
++ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
++ { 1154, 0x00000405 }, /* GL_BACK */
++ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
++ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
++ { 1189, 0x000080E0 }, /* GL_BGR */
++ { 1196, 0x000080E1 }, /* GL_BGRA */
++ { 1204, 0x00001A00 }, /* GL_BITMAP */
++ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
++ { 1230, 0x00000BE2 }, /* GL_BLEND */
++ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
++ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
++ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
++ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
++ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
++ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
++ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
++ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
++ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
++ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
++ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
++ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
++ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
++ { 1489, 0x00001905 }, /* GL_BLUE */
++ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
++ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
++ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
++ { 1537, 0x00008B56 }, /* GL_BOOL */
++ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
++ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
++ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
++ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
++ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
++ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
++ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
++ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
++ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
++ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
++ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
++ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
++ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
++ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
++ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
++ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
++ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
++ { 1841, 0x00001400 }, /* GL_BYTE */
++ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
++ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
++ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
++ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
++ { 1899, 0x00000901 }, /* GL_CCW */
++ { 1906, 0x00002900 }, /* GL_CLAMP */
++ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
++ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
++ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
++ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
++ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
++ { 2020, 0x00001500 }, /* GL_CLEAR */
++ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
++ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
++ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
++ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
++ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
++ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
++ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
++ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
++ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
++ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
++ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
++ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
++ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
++ { 2314, 0x00000A00 }, /* GL_COEFF */
++ { 2323, 0x00001800 }, /* GL_COLOR */
++ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
++ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
++ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
++ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
++ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
++ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
++ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
++ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
++ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
++ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
++ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
++ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
++ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
++ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
++ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
++ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
++ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
++ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
++ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
++ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
++ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
++ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
++ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
++ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
++ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
++ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
++ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
++ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
++ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
++ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
++ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
++ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
++ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
++ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
++ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
++ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
++ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
++ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
++ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
++ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
++ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
++ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
++ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
++ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
++ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
++ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
++ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
++ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
++ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
++ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
++ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
++ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
++ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
++ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
++ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
++ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
++ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
++ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
++ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
++ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
++ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
++ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
++ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
++ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
++ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
++ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
++ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
++ { 3988, 0x00008570 }, /* GL_COMBINE */
++ { 3999, 0x00008503 }, /* GL_COMBINE4 */
++ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
++ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
++ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
++ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
++ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
++ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
++ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
++ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
++ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
++ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
++ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
++ { 4241, 0x00001300 }, /* GL_COMPILE */
++ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
++ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
++ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
++ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
++ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
++ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
++ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
++ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
++ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
++ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
++ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
++ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
++ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
++ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
++ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
++ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
++ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
++ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
++ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
++ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
++ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
++ { 4805, 0x00008576 }, /* GL_CONSTANT */
++ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
++ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
++ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
++ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
++ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
++ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
++ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
++ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
++ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
++ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
++ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
++ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
++ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
++ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
++ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
++ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
++ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
++ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
++ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
++ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
++ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
++ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
++ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
++ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
++ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
++ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
++ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
++ { 5446, 0x00001503 }, /* GL_COPY */
++ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
++ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
++ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
++ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
++ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
++ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
++ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
++ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
++ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
++ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
++ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
++ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
++ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
++ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
++ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
++ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
++ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
++ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
++ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
++ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
++ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
++ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
++ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
++ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
++ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
++ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
++ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
++ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
++ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
++ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
++ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
++ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
++ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
++ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
++ { 6265, 0x00000900 }, /* GL_CW */
++ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
++ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
++ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
++ { 6333, 0x00002101 }, /* GL_DECAL */
++ { 6342, 0x00001E03 }, /* GL_DECR */
++ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
++ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
++ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
++ { 6397, 0x00001801 }, /* GL_DEPTH */
++ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
++ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
++ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
++ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
++ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
++ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
++ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
++ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
++ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
++ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
++ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
++ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
++ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
++ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
++ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
++ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
++ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
++ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
++ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
++ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
++ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
++ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
++ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
++ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
++ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
++ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
++ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
++ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
++ { 6998, 0x00001201 }, /* GL_DIFFUSE */
++ { 7009, 0x00000BD0 }, /* GL_DITHER */
++ { 7019, 0x00000A02 }, /* GL_DOMAIN */
++ { 7029, 0x00001100 }, /* GL_DONT_CARE */
++ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
++ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
++ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
++ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
++ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
++ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
++ { 7133, 0x0000140A }, /* GL_DOUBLE */
++ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
++ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
++ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
++ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
++ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
++ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
++ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
++ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
++ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
++ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
++ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
++ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
++ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
++ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
++ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
++ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
++ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
++ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
++ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
++ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
++ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
++ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
++ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
++ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
++ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
++ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
++ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
++ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
++ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
++ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
++ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
++ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
++ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
++ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
++ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
++ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
++ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
++ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
++ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
++ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
++ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
++ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
++ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
++ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
++ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
++ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
++ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
++ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
++ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
++ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
++ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
++ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
++ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
++ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
++ { 8177, 0x00000306 }, /* GL_DST_COLOR */
++ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
++ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
++ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
++ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
++ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
++ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
++ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
++ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
++ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
++ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
++ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
++ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
++ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
++ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
++ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
++ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
++ { 8575, 0x00001600 }, /* GL_EMISSION */
++ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
++ { 8601, 0x00000202 }, /* GL_EQUAL */
++ { 8610, 0x00001509 }, /* GL_EQUIV */
++ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
++ { 8631, 0x00000800 }, /* GL_EXP */
++ { 8638, 0x00000801 }, /* GL_EXP2 */
++ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
++ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
++ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
++ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
++ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
++ { 8729, 0x00000000 }, /* GL_FALSE */
++ { 8738, 0x00001101 }, /* GL_FASTEST */
++ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
++ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
++ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
++ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
++ { 8836, 0x00001B02 }, /* GL_FILL */
++ { 8844, 0x00001D00 }, /* GL_FLAT */
++ { 8852, 0x00001406 }, /* GL_FLOAT */
++ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
++ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
++ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
++ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
++ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
++ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
++ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
++ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
++ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
++ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
++ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
++ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
++ { 9053, 0x00000B60 }, /* GL_FOG */
++ { 9060, 0x00000080 }, /* GL_FOG_BIT */
++ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
++ { 9084, 0x00008451 }, /* GL_FOG_COORD */
++ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
++ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
++ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
++ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
++ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
++ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
++ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
++ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
++ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
++ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
++ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
++ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
++ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
++ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
++ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
++ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
++ { 9524, 0x00000B64 }, /* GL_FOG_END */
++ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
++ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
++ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
++ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
++ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
++ { 9616, 0x00000B63 }, /* GL_FOG_START */
++ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
++ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
++ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
++ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
++ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
++ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
++ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
++ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
++ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
++ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
++ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
++ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
++ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
++ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
++ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
++ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
++ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
++ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
++ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
++ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
++ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
++ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
++ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
++ { 10462, 0x00000404 }, /* GL_FRONT */
++ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
++ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
++ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
++ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
++ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
++ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
++ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
++ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
++ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
++ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
++ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
++ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
++ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
++ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
++ { 10748, 0x00000206 }, /* GL_GEQUAL */
++ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
++ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
++ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
++ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
++ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
++ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
++ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
++ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
++ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
++ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
++ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
++ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
++ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
++ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
++ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
++ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
++ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
++ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
++ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
++ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
++ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
++ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
++ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
++ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
++ { 11304, 0x00000204 }, /* GL_GREATER */
++ { 11315, 0x00001904 }, /* GL_GREEN */
++ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
++ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
++ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
++ { 11367, 0x00008000 }, /* GL_HINT_BIT */
++ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
++ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
++ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
++ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
++ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
++ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
++ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
++ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
++ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
++ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
++ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
++ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
++ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
++ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
++ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
++ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
++ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
++ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
++ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
++ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
++ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
++ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
++ { 11910, 0x00001E02 }, /* GL_INCR */
++ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
++ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
++ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
++ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
++ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
++ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
++ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
++ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
++ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
++ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
++ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
++ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
++ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
++ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
++ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
++ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
++ { 12228, 0x00001404 }, /* GL_INT */
++ { 12235, 0x00008049 }, /* GL_INTENSITY */
++ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
++ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
++ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
++ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
++ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
++ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
++ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
++ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
++ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
++ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
++ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
++ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
++ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
++ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
++ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
++ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
++ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
++ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
++ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
++ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
++ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
++ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
++ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
++ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
++ { 12663, 0x0000150A }, /* GL_INVERT */
++ { 12673, 0x00001E00 }, /* GL_KEEP */
++ { 12681, 0x00000406 }, /* GL_LEFT */
++ { 12689, 0x00000203 }, /* GL_LEQUAL */
++ { 12699, 0x00000201 }, /* GL_LESS */
++ { 12707, 0x00004000 }, /* GL_LIGHT0 */
++ { 12717, 0x00004001 }, /* GL_LIGHT1 */
++ { 12727, 0x00004002 }, /* GL_LIGHT2 */
++ { 12737, 0x00004003 }, /* GL_LIGHT3 */
++ { 12747, 0x00004004 }, /* GL_LIGHT4 */
++ { 12757, 0x00004005 }, /* GL_LIGHT5 */
++ { 12767, 0x00004006 }, /* GL_LIGHT6 */
++ { 12777, 0x00004007 }, /* GL_LIGHT7 */
++ { 12787, 0x00000B50 }, /* GL_LIGHTING */
++ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
++ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
++ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
++ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
++ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
++ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
++ { 12952, 0x00001B01 }, /* GL_LINE */
++ { 12960, 0x00002601 }, /* GL_LINEAR */
++ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
++ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
++ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
++ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
++ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
++ { 13102, 0x00000001 }, /* GL_LINES */
++ { 13111, 0x00000004 }, /* GL_LINE_BIT */
++ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
++ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
++ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
++ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
++ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
++ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
++ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
++ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
++ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
++ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
++ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
++ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
++ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
++ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
++ { 13370, 0x00020000 }, /* GL_LIST_BIT */
++ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
++ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
++ { 13409, 0x00000101 }, /* GL_LOAD */
++ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
++ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
++ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
++ { 13460, 0x00001909 }, /* GL_LUMINANCE */
++ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
++ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
++ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
++ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
++ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
++ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
++ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
++ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
++ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
++ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
++ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
++ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
++ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
++ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
++ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
++ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
++ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
++ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
++ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
++ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
++ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
++ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
++ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
++ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
++ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
++ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
++ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
++ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
++ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
++ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
++ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
++ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
++ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
++ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
++ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
++ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
++ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
++ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
++ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
++ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
++ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
++ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
++ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
++ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
++ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
++ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
++ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
++ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
++ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
++ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
++ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
++ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
++ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
++ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
++ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
++ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
++ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
++ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
++ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
++ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
++ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
++ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
++ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
++ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
++ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
++ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
++ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
++ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
++ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
++ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
++ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
++ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
++ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
++ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
++ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
++ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
++ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
++ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
++ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
++ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
++ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
++ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
++ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
++ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
++ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
++ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
++ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
++ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
++ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
++ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
++ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
++ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
++ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
++ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
++ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
++ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
++ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
++ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
++ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
++ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
++ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
++ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
++ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
++ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
++ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
++ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
++ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
++ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
++ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
++ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
++ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
++ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
++ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
++ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
++ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
++ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
++ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
++ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
++ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
++ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
++ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
++ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
++ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
++ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
++ { 16086, 0x00008008 }, /* GL_MAX */
++ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
++ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
++ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
++ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
++ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
++ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
++ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
++ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
++ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
++ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
++ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
++ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
++ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
++ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
++ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
++ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
++ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
++ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
++ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
++ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
++ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
++ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
++ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
++ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
++ { 16766, 0x00008008 }, /* GL_MAX_EXT */
++ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
++ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
++ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
++ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
++ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
++ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
++ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
++ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
++ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
++ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
++ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
++ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
++ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
++ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
++ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
++ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
++ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
++ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
++ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
++ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
++ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
++ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
++ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
++ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
++ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
++ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
++ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
++ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
++ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
++ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
++ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
++ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
++ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
++ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
++ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
++ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
++ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
++ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
++ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
++ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
++ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
++ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
++ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
++ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
++ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
++ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
++ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
++ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
++ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
++ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
++ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
++ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
++ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
++ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
++ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
++ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
++ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
++ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
++ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
++ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
++ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
++ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
++ { 18669, 0x00008007 }, /* GL_MIN */
++ { 18676, 0x0000802E }, /* GL_MINMAX */
++ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
++ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
++ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
++ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
++ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
++ { 18772, 0x00008007 }, /* GL_MIN_EXT */
++ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
++ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
++ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
++ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
++ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
++ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
++ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
++ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
++ { 18974, 0x00001700 }, /* GL_MODELVIEW */
++ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
++ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
++ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
++ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
++ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
++ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
++ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
++ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
++ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
++ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
++ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
++ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
++ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
++ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
++ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
++ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
++ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
++ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
++ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
++ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
++ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
++ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
++ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
++ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
++ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
++ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
++ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
++ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
++ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
++ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
++ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
++ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
++ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
++ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
++ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
++ { 19657, 0x00002100 }, /* GL_MODULATE */
++ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
++ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
++ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
++ { 19741, 0x00000103 }, /* GL_MULT */
++ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
++ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
++ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
++ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
++ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
++ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
++ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
++ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
++ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
++ { 19930, 0x0000150E }, /* GL_NAND */
++ { 19938, 0x00002600 }, /* GL_NEAREST */
++ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
++ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
++ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
++ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
++ { 20063, 0x00000200 }, /* GL_NEVER */
++ { 20072, 0x00001102 }, /* GL_NICEST */
++ { 20082, 0x00000000 }, /* GL_NONE */
++ { 20090, 0x00001505 }, /* GL_NOOP */
++ { 20098, 0x00001508 }, /* GL_NOR */
++ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
++ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
++ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
++ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
++ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
++ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
++ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
++ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
++ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
++ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
++ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
++ { 20329, 0x00000000 }, /* GL_NO_ERROR */
++ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
++ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
++ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
++ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
++ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
++ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
++ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
++ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
++ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
++ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
++ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
++ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
++ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
++ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
++ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
++ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
++ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
++ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
++ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
++ { 20889, 0x00000001 }, /* GL_ONE */
++ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
++ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
++ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
++ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
++ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
++ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
++ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
++ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
++ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
++ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
++ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
++ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
++ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
++ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
++ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
++ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
++ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
++ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
++ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
++ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
++ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
++ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
++ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
++ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
++ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
++ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
++ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
++ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
++ { 21502, 0x00001507 }, /* GL_OR */
++ { 21508, 0x00000A01 }, /* GL_ORDER */
++ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
++ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
++ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
++ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
++ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
++ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
++ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
++ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
++ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
++ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
++ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
++ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
++ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
++ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
++ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
++ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
++ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
++ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
++ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
++ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
++ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
++ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
++ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
++ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
++ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
++ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
++ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
++ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
++ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
++ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
++ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
++ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
++ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
++ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
++ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
++ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
++ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
++ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
++ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
++ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
++ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
++ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
++ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
++ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
++ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
++ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
++ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
++ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
++ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
++ { 22605, 0x00001B00 }, /* GL_POINT */
++ { 22614, 0x00000000 }, /* GL_POINTS */
++ { 22624, 0x00000002 }, /* GL_POINT_BIT */
++ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
++ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
++ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
++ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
++ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
++ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
++ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
++ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
++ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
++ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
++ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
++ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
++ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
++ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
++ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
++ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
++ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
++ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
++ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
++ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
++ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
++ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
++ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
++ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
++ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
++ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
++ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
++ { 23291, 0x00000009 }, /* GL_POLYGON */
++ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
++ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
++ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
++ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
++ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
++ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
++ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
++ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
++ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
++ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
++ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
++ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
++ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
++ { 23575, 0x00001203 }, /* GL_POSITION */
++ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
++ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
++ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
++ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
++ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
++ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
++ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
++ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
++ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
++ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
++ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
++ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
++ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
++ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
++ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
++ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
++ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
++ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
++ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
++ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
++ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
++ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
++ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
++ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
++ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
++ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
++ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
++ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
++ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
++ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
++ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
++ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
++ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
++ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
++ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
++ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
++ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
++ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
++ { 24862, 0x00008578 }, /* GL_PREVIOUS */
++ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
++ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
++ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
++ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
++ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
++ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
++ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
++ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
++ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
++ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
++ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
++ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
++ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
++ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
++ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
++ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
++ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
++ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
++ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
++ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
++ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
++ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
++ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
++ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
++ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
++ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
++ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
++ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
++ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
++ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
++ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
++ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
++ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
++ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
++ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
++ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
++ { 25858, 0x00001701 }, /* GL_PROJECTION */
++ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
++ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
++ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
++ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
++ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
++ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
++ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
++ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
++ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
++ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
++ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
++ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
++ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
++ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
++ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
++ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
++ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
++ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
++ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
++ { 26377, 0x00002003 }, /* GL_Q */
++ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
++ { 26407, 0x00000007 }, /* GL_QUADS */
++ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
++ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
++ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
++ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
++ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
++ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
++ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
++ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
++ { 26587, 0x00002002 }, /* GL_R */
++ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
++ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
++ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
++ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
++ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
++ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
++ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
++ { 26738, 0x000088BA }, /* GL_READ_WRITE */
++ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
++ { 26770, 0x00001903 }, /* GL_RED */
++ { 26777, 0x00008016 }, /* GL_REDUCE */
++ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
++ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
++ { 26813, 0x00000D52 }, /* GL_RED_BITS */
++ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
++ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
++ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
++ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
++ { 26899, 0x00001C00 }, /* GL_RENDER */
++ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
++ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
++ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
++ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
++ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
++ { 27046, 0x00001F01 }, /* GL_RENDERER */
++ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
++ { 27073, 0x00002901 }, /* GL_REPEAT */
++ { 27083, 0x00001E01 }, /* GL_REPLACE */
++ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
++ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
++ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
++ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
++ { 27172, 0x00000102 }, /* GL_RETURN */
++ { 27182, 0x00001907 }, /* GL_RGB */
++ { 27189, 0x00008052 }, /* GL_RGB10 */
++ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
++ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
++ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
++ { 27239, 0x00008053 }, /* GL_RGB12 */
++ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
++ { 27261, 0x00008054 }, /* GL_RGB16 */
++ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
++ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
++ { 27295, 0x0000804F }, /* GL_RGB4 */
++ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
++ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
++ { 27328, 0x00008050 }, /* GL_RGB5 */
++ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
++ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
++ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
++ { 27374, 0x00008051 }, /* GL_RGB8 */
++ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
++ { 27394, 0x00001908 }, /* GL_RGBA */
++ { 27402, 0x0000805A }, /* GL_RGBA12 */
++ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
++ { 27426, 0x0000805B }, /* GL_RGBA16 */
++ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
++ { 27450, 0x00008055 }, /* GL_RGBA2 */
++ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
++ { 27472, 0x00008056 }, /* GL_RGBA4 */
++ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
++ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
++ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
++ { 27527, 0x00008058 }, /* GL_RGBA8 */
++ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
++ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
++ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
++ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
++ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
++ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
++ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
++ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
++ { 27652, 0x00000407 }, /* GL_RIGHT */
++ { 27661, 0x00002000 }, /* GL_S */
++ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
++ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
++ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
++ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
++ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
++ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
++ { 27766, 0x000080A9 }, /* GL_SAMPLES */
++ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
++ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
++ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
++ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
++ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
++ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
++ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
++ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
++ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
++ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
++ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
++ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
++ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
++ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
++ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
++ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
++ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
++ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
++ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
++ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
++ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
++ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
++ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
++ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
++ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
++ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
++ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
++ { 28453, 0x00001C02 }, /* GL_SELECT */
++ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
++ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
++ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
++ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
++ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
++ { 28590, 0x0000150F }, /* GL_SET */
++ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
++ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
++ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
++ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
++ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
++ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
++ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
++ { 28753, 0x00001601 }, /* GL_SHININESS */
++ { 28766, 0x00001402 }, /* GL_SHORT */
++ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
++ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
++ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
++ { 28830, 0x00001D01 }, /* GL_SMOOTH */
++ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
++ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
++ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
++ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
++ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
++ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
++ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
++ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
++ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
++ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
++ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
++ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
++ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
++ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
++ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
++ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
++ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
++ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
++ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
++ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
++ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
++ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
++ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
++ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
++ { 29334, 0x00001202 }, /* GL_SPECULAR */
++ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
++ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
++ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
++ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
++ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
++ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
++ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
++ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
++ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
++ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
++ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
++ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
++ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
++ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
++ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
++ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
++ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
++ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
++ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
++ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
++ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
++ { 29675, 0x00001802 }, /* GL_STENCIL */
++ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
++ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
++ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
++ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
++ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
++ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
++ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
++ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
++ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
++ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
++ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
++ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
++ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
++ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
++ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
++ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
++ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
++ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
++ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
++ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
++ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
++ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
++ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
++ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
++ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
++ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
++ { 30268, 0x00000C33 }, /* GL_STEREO */
++ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
++ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
++ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
++ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
++ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
++ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
++ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
++ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
++ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
++ { 30425, 0x00002001 }, /* GL_T */
++ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
++ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
++ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
++ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
++ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
++ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
++ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
++ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
++ { 30559, 0x00001702 }, /* GL_TEXTURE */
++ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
++ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
++ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
++ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
++ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
++ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
++ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
++ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
++ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
++ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
++ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
++ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
++ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
++ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
++ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
++ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
++ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
++ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
++ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
++ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
++ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
++ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
++ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
++ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
++ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
++ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
++ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
++ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
++ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
++ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
++ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
++ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
++ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
++ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
++ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
++ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
++ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
++ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
++ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
++ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
++ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
++ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
++ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
++ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
++ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
++ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
++ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
++ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
++ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
++ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
++ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
++ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
++ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
++ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
++ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
++ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
++ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
++ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
++ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
++ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
++ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
++ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
++ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
++ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
++ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
++ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
++ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
++ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
++ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
++ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
++ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
++ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
++ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
++ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
++ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
++ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
++ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
++ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
++ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
++ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
++ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
++ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
++ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
++ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
++ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
++ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
++ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
++ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
++ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
++ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
++ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
++ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
++ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
++ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
++ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
++ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
++ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
++ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
++ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
++ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
++ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
++ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
++ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
++ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
++ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
++ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
++ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
++ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
++ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
++ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
++ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
++ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
++ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
++ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
++ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
++ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
++ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
++ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
++ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
++ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
++ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
++ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
++ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
++ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
++ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
++ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
++ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
++ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
++ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
++ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
++ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
++ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
++ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
++ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
++ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
++ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
++ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
++ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
++ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
++ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
++ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
++ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
++ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
++ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
++ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
++ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
++ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
++ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
++ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
++ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
++ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
++ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
++ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
++ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
++ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
++ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
++ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
++ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
++ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
++ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
++ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
++ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
++ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
++ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
++ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
++ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
++ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
++ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
++ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
++ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
++ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
++ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
++ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
++ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
++ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
++ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
++ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
++ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
++ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
++ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
++ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
++ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
++ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
++ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
++ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
++ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
++ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
++ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
++ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
++ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
++ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
++ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
++ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
++ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
++ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
++ { 34912, 0x00000004 }, /* GL_TRIANGLES */
++ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
++ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
++ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
++ { 34980, 0x00000001 }, /* GL_TRUE */
++ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
++ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
++ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
++ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
++ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
++ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
++ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
++ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
++ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
++ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
++ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
++ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
++ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
++ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
++ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
++ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
++ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
++ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
++ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
++ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
++ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
++ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
++ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
++ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
++ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
++ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
++ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
++ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
++ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
++ { 35688, 0x00002A20 }, /* GL_V2F */
++ { 35695, 0x00002A21 }, /* GL_V3F */
++ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
++ { 35721, 0x00001F00 }, /* GL_VENDOR */
++ { 35731, 0x00001F02 }, /* GL_VERSION */
++ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
++ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
++ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
++ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
++ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
++ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
++ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
++ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
++ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
++ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
++ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
++ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
++ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
++ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
++ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
++ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
++ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
++ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
++ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
++ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
++ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
++ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
++ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
++ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
++ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
++ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
++ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
++ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
++ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
++ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
++ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
++ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
++ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
++ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
++ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
++ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
++ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
++ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
++ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
++ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
++ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
++ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
++ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
++ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
++ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
++ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
++ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
++ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
++ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
++ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
++ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
++ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
++ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
++ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
++ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
++ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
++ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
++ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
++ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
++ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
++ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
++ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
++ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
++ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
++ { 37482, 0x00001506 }, /* GL_XOR */
++ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
++ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
++ { 37522, 0x00000000 }, /* GL_ZERO */
++ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
++ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
++};
++
++static const unsigned reduced_enums[1284] =
++{
++ 436, /* GL_FALSE */
++ 645, /* GL_LINES */
++ 647, /* GL_LINE_LOOP */
++ 654, /* GL_LINE_STRIP */
++ 1637, /* GL_TRIANGLES */
++ 1640, /* GL_TRIANGLE_STRIP */
++ 1638, /* GL_TRIANGLE_FAN */
++ 1211, /* GL_QUADS */
++ 1213, /* GL_QUAD_STRIP */
++ 1099, /* GL_POLYGON */
++ 1111, /* GL_POLYGON_STIPPLE_BIT */
++ 1064, /* GL_PIXEL_MODE_BIT */
++ 632, /* GL_LIGHTING_BIT */
++ 458, /* GL_FOG_BIT */
++ 8, /* GL_ACCUM */
++ 664, /* GL_LOAD */
++ 1253, /* GL_RETURN */
++ 937, /* GL_MULT */
++ 23, /* GL_ADD */
++ 953, /* GL_NEVER */
++ 622, /* GL_LESS */
++ 426, /* GL_EQUAL */
++ 621, /* GL_LEQUAL */
++ 547, /* GL_GREATER */
++ 968, /* GL_NOTEQUAL */
++ 522, /* GL_GEQUAL */
++ 46, /* GL_ALWAYS */
++ 1386, /* GL_SRC_COLOR */
++ 997, /* GL_ONE_MINUS_SRC_COLOR */
++ 1384, /* GL_SRC_ALPHA */
++ 996, /* GL_ONE_MINUS_SRC_ALPHA */
++ 406, /* GL_DST_ALPHA */
++ 994, /* GL_ONE_MINUS_DST_ALPHA */
++ 407, /* GL_DST_COLOR */
++ 995, /* GL_ONE_MINUS_DST_COLOR */
++ 1385, /* GL_SRC_ALPHA_SATURATE */
++ 510, /* GL_FRONT_LEFT */
++ 511, /* GL_FRONT_RIGHT */
++ 69, /* GL_BACK_LEFT */
++ 70, /* GL_BACK_RIGHT */
++ 507, /* GL_FRONT */
++ 68, /* GL_BACK */
++ 620, /* GL_LEFT */
++ 1293, /* GL_RIGHT */
++ 508, /* GL_FRONT_AND_BACK */
++ 63, /* GL_AUX0 */
++ 64, /* GL_AUX1 */
++ 65, /* GL_AUX2 */
++ 66, /* GL_AUX3 */
++ 612, /* GL_INVALID_ENUM */
++ 615, /* GL_INVALID_VALUE */
++ 614, /* GL_INVALID_OPERATION */
++ 1387, /* GL_STACK_OVERFLOW */
++ 1388, /* GL_STACK_UNDERFLOW */
++ 1022, /* GL_OUT_OF_MEMORY */
++ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
++ 0, /* GL_2D */
++ 2, /* GL_3D */
++ 3, /* GL_3D_COLOR */
++ 4, /* GL_3D_COLOR_TEXTURE */
++ 6, /* GL_4D_COLOR_TEXTURE */
++ 1042, /* GL_PASS_THROUGH_TOKEN */
++ 1098, /* GL_POINT_TOKEN */
++ 655, /* GL_LINE_TOKEN */
++ 1112, /* GL_POLYGON_TOKEN */
++ 74, /* GL_BITMAP_TOKEN */
++ 405, /* GL_DRAW_PIXEL_TOKEN */
++ 271, /* GL_COPY_PIXEL_TOKEN */
++ 648, /* GL_LINE_RESET_TOKEN */
++ 429, /* GL_EXP */
++ 430, /* GL_EXP2 */
++ 304, /* GL_CW */
++ 116, /* GL_CCW */
++ 137, /* GL_COEFF */
++ 1019, /* GL_ORDER */
++ 344, /* GL_DOMAIN */
++ 279, /* GL_CURRENT_COLOR */
++ 282, /* GL_CURRENT_INDEX */
++ 288, /* GL_CURRENT_NORMAL */
++ 300, /* GL_CURRENT_TEXTURE_COORDS */
++ 293, /* GL_CURRENT_RASTER_COLOR */
++ 295, /* GL_CURRENT_RASTER_INDEX */
++ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
++ 296, /* GL_CURRENT_RASTER_POSITION */
++ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
++ 294, /* GL_CURRENT_RASTER_DISTANCE */
++ 1091, /* GL_POINT_SMOOTH */
++ 1080, /* GL_POINT_SIZE */
++ 1090, /* GL_POINT_SIZE_RANGE */
++ 1081, /* GL_POINT_SIZE_GRANULARITY */
++ 649, /* GL_LINE_SMOOTH */
++ 656, /* GL_LINE_WIDTH */
++ 658, /* GL_LINE_WIDTH_RANGE */
++ 657, /* GL_LINE_WIDTH_GRANULARITY */
++ 651, /* GL_LINE_STIPPLE */
++ 652, /* GL_LINE_STIPPLE_PATTERN */
++ 653, /* GL_LINE_STIPPLE_REPEAT */
++ 663, /* GL_LIST_MODE */
++ 822, /* GL_MAX_LIST_NESTING */
++ 660, /* GL_LIST_BASE */
++ 662, /* GL_LIST_INDEX */
++ 1101, /* GL_POLYGON_MODE */
++ 1108, /* GL_POLYGON_SMOOTH */
++ 1110, /* GL_POLYGON_STIPPLE */
++ 414, /* GL_EDGE_FLAG */
++ 272, /* GL_CULL_FACE */
++ 273, /* GL_CULL_FACE_MODE */
++ 509, /* GL_FRONT_FACE */
++ 631, /* GL_LIGHTING */
++ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
++ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
++ 633, /* GL_LIGHT_MODEL_AMBIENT */
++ 1339, /* GL_SHADE_MODEL */
++ 168, /* GL_COLOR_MATERIAL_FACE */
++ 169, /* GL_COLOR_MATERIAL_PARAMETER */
++ 167, /* GL_COLOR_MATERIAL */
++ 457, /* GL_FOG */
++ 479, /* GL_FOG_INDEX */
++ 475, /* GL_FOG_DENSITY */
++ 483, /* GL_FOG_START */
++ 477, /* GL_FOG_END */
++ 480, /* GL_FOG_MODE */
++ 459, /* GL_FOG_COLOR */
++ 333, /* GL_DEPTH_RANGE */
++ 338, /* GL_DEPTH_TEST */
++ 341, /* GL_DEPTH_WRITEMASK */
++ 321, /* GL_DEPTH_CLEAR_VALUE */
++ 332, /* GL_DEPTH_FUNC */
++ 12, /* GL_ACCUM_CLEAR_VALUE */
++ 1418, /* GL_STENCIL_TEST */
++ 1406, /* GL_STENCIL_CLEAR_VALUE */
++ 1408, /* GL_STENCIL_FUNC */
++ 1420, /* GL_STENCIL_VALUE_MASK */
++ 1407, /* GL_STENCIL_FAIL */
++ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
++ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
++ 1417, /* GL_STENCIL_REF */
++ 1421, /* GL_STENCIL_WRITEMASK */
++ 791, /* GL_MATRIX_MODE */
++ 958, /* GL_NORMALIZE */
++ 1727, /* GL_VIEWPORT */
++ 932, /* GL_MODELVIEW_STACK_DEPTH */
++ 1191, /* GL_PROJECTION_STACK_DEPTH */
++ 1616, /* GL_TEXTURE_STACK_DEPTH */
++ 930, /* GL_MODELVIEW_MATRIX */
++ 1190, /* GL_PROJECTION_MATRIX */
++ 1601, /* GL_TEXTURE_MATRIX */
++ 61, /* GL_ATTRIB_STACK_DEPTH */
++ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
++ 43, /* GL_ALPHA_TEST */
++ 44, /* GL_ALPHA_TEST_FUNC */
++ 45, /* GL_ALPHA_TEST_REF */
++ 343, /* GL_DITHER */
++ 78, /* GL_BLEND_DST */
++ 86, /* GL_BLEND_SRC */
++ 75, /* GL_BLEND */
++ 666, /* GL_LOGIC_OP_MODE */
++ 586, /* GL_INDEX_LOGIC_OP */
++ 166, /* GL_COLOR_LOGIC_OP */
++ 67, /* GL_AUX_BUFFERS */
++ 354, /* GL_DRAW_BUFFER */
++ 1223, /* GL_READ_BUFFER */
++ 1320, /* GL_SCISSOR_BOX */
++ 1321, /* GL_SCISSOR_TEST */
++ 585, /* GL_INDEX_CLEAR_VALUE */
++ 590, /* GL_INDEX_WRITEMASK */
++ 163, /* GL_COLOR_CLEAR_VALUE */
++ 205, /* GL_COLOR_WRITEMASK */
++ 587, /* GL_INDEX_MODE */
++ 1287, /* GL_RGBA_MODE */
++ 353, /* GL_DOUBLEBUFFER */
++ 1422, /* GL_STEREO */
++ 1246, /* GL_RENDER_MODE */
++ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
++ 1092, /* GL_POINT_SMOOTH_HINT */
++ 650, /* GL_LINE_SMOOTH_HINT */
++ 1109, /* GL_POLYGON_SMOOTH_HINT */
++ 478, /* GL_FOG_HINT */
++ 1582, /* GL_TEXTURE_GEN_S */
++ 1583, /* GL_TEXTURE_GEN_T */
++ 1581, /* GL_TEXTURE_GEN_R */
++ 1580, /* GL_TEXTURE_GEN_Q */
++ 1056, /* GL_PIXEL_MAP_I_TO_I */
++ 1062, /* GL_PIXEL_MAP_S_TO_S */
++ 1058, /* GL_PIXEL_MAP_I_TO_R */
++ 1054, /* GL_PIXEL_MAP_I_TO_G */
++ 1052, /* GL_PIXEL_MAP_I_TO_B */
++ 1050, /* GL_PIXEL_MAP_I_TO_A */
++ 1060, /* GL_PIXEL_MAP_R_TO_R */
++ 1048, /* GL_PIXEL_MAP_G_TO_G */
++ 1046, /* GL_PIXEL_MAP_B_TO_B */
++ 1044, /* GL_PIXEL_MAP_A_TO_A */
++ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
++ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
++ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
++ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
++ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
++ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
++ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
++ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
++ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
++ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
++ 1649, /* GL_UNPACK_SWAP_BYTES */
++ 1644, /* GL_UNPACK_LSB_FIRST */
++ 1645, /* GL_UNPACK_ROW_LENGTH */
++ 1648, /* GL_UNPACK_SKIP_ROWS */
++ 1647, /* GL_UNPACK_SKIP_PIXELS */
++ 1642, /* GL_UNPACK_ALIGNMENT */
++ 1031, /* GL_PACK_SWAP_BYTES */
++ 1026, /* GL_PACK_LSB_FIRST */
++ 1027, /* GL_PACK_ROW_LENGTH */
++ 1030, /* GL_PACK_SKIP_ROWS */
++ 1029, /* GL_PACK_SKIP_PIXELS */
++ 1023, /* GL_PACK_ALIGNMENT */
++ 744, /* GL_MAP_COLOR */
++ 745, /* GL_MAP_STENCIL */
++ 589, /* GL_INDEX_SHIFT */
++ 588, /* GL_INDEX_OFFSET */
++ 1235, /* GL_RED_SCALE */
++ 1233, /* GL_RED_BIAS */
++ 1744, /* GL_ZOOM_X */
++ 1745, /* GL_ZOOM_Y */
++ 551, /* GL_GREEN_SCALE */
++ 549, /* GL_GREEN_BIAS */
++ 92, /* GL_BLUE_SCALE */
++ 90, /* GL_BLUE_BIAS */
++ 42, /* GL_ALPHA_SCALE */
++ 40, /* GL_ALPHA_BIAS */
++ 334, /* GL_DEPTH_SCALE */
++ 315, /* GL_DEPTH_BIAS */
++ 817, /* GL_MAX_EVAL_ORDER */
++ 821, /* GL_MAX_LIGHTS */
++ 800, /* GL_MAX_CLIP_PLANES */
++ 865, /* GL_MAX_TEXTURE_SIZE */
++ 827, /* GL_MAX_PIXEL_MAP_TABLE */
++ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
++ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
++ 825, /* GL_MAX_NAME_STACK_DEPTH */
++ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
++ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
++ 880, /* GL_MAX_VIEWPORT_DIMS */
++ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
++ 1429, /* GL_SUBPIXEL_BITS */
++ 584, /* GL_INDEX_BITS */
++ 1234, /* GL_RED_BITS */
++ 550, /* GL_GREEN_BITS */
++ 91, /* GL_BLUE_BITS */
++ 41, /* GL_ALPHA_BITS */
++ 316, /* GL_DEPTH_BITS */
++ 1404, /* GL_STENCIL_BITS */
++ 14, /* GL_ACCUM_RED_BITS */
++ 13, /* GL_ACCUM_GREEN_BITS */
++ 10, /* GL_ACCUM_BLUE_BITS */
++ 9, /* GL_ACCUM_ALPHA_BITS */
++ 946, /* GL_NAME_STACK_DEPTH */
++ 62, /* GL_AUTO_NORMAL */
++ 690, /* GL_MAP1_COLOR_4 */
++ 693, /* GL_MAP1_INDEX */
++ 694, /* GL_MAP1_NORMAL */
++ 695, /* GL_MAP1_TEXTURE_COORD_1 */
++ 696, /* GL_MAP1_TEXTURE_COORD_2 */
++ 697, /* GL_MAP1_TEXTURE_COORD_3 */
++ 698, /* GL_MAP1_TEXTURE_COORD_4 */
++ 699, /* GL_MAP1_VERTEX_3 */
++ 700, /* GL_MAP1_VERTEX_4 */
++ 717, /* GL_MAP2_COLOR_4 */
++ 720, /* GL_MAP2_INDEX */
++ 721, /* GL_MAP2_NORMAL */
++ 722, /* GL_MAP2_TEXTURE_COORD_1 */
++ 723, /* GL_MAP2_TEXTURE_COORD_2 */
++ 724, /* GL_MAP2_TEXTURE_COORD_3 */
++ 725, /* GL_MAP2_TEXTURE_COORD_4 */
++ 726, /* GL_MAP2_VERTEX_3 */
++ 727, /* GL_MAP2_VERTEX_4 */
++ 691, /* GL_MAP1_GRID_DOMAIN */
++ 692, /* GL_MAP1_GRID_SEGMENTS */
++ 718, /* GL_MAP2_GRID_DOMAIN */
++ 719, /* GL_MAP2_GRID_SEGMENTS */
++ 1506, /* GL_TEXTURE_1D */
++ 1508, /* GL_TEXTURE_2D */
++ 439, /* GL_FEEDBACK_BUFFER_POINTER */
++ 440, /* GL_FEEDBACK_BUFFER_SIZE */
++ 441, /* GL_FEEDBACK_BUFFER_TYPE */
++ 1330, /* GL_SELECTION_BUFFER_POINTER */
++ 1331, /* GL_SELECTION_BUFFER_SIZE */
++ 1619, /* GL_TEXTURE_WIDTH */
++ 1587, /* GL_TEXTURE_HEIGHT */
++ 1543, /* GL_TEXTURE_COMPONENTS */
++ 1527, /* GL_TEXTURE_BORDER_COLOR */
++ 1526, /* GL_TEXTURE_BORDER */
++ 345, /* GL_DONT_CARE */
++ 437, /* GL_FASTEST */
++ 954, /* GL_NICEST */
++ 47, /* GL_AMBIENT */
++ 342, /* GL_DIFFUSE */
++ 1373, /* GL_SPECULAR */
++ 1113, /* GL_POSITION */
++ 1376, /* GL_SPOT_DIRECTION */
++ 1377, /* GL_SPOT_EXPONENT */
++ 1375, /* GL_SPOT_CUTOFF */
++ 245, /* GL_CONSTANT_ATTENUATION */
++ 640, /* GL_LINEAR_ATTENUATION */
++ 1210, /* GL_QUADRATIC_ATTENUATION */
++ 219, /* GL_COMPILE */
++ 220, /* GL_COMPILE_AND_EXECUTE */
++ 111, /* GL_BYTE */
++ 1650, /* GL_UNSIGNED_BYTE */
++ 1344, /* GL_SHORT */
++ 1659, /* GL_UNSIGNED_SHORT */
++ 592, /* GL_INT */
++ 1653, /* GL_UNSIGNED_INT */
++ 444, /* GL_FLOAT */
++ 1, /* GL_2_BYTES */
++ 5, /* GL_3_BYTES */
++ 7, /* GL_4_BYTES */
++ 352, /* GL_DOUBLE */
++ 123, /* GL_CLEAR */
++ 49, /* GL_AND */
++ 51, /* GL_AND_REVERSE */
++ 269, /* GL_COPY */
++ 50, /* GL_AND_INVERTED */
++ 956, /* GL_NOOP */
++ 1740, /* GL_XOR */
++ 1018, /* GL_OR */
++ 957, /* GL_NOR */
++ 427, /* GL_EQUIV */
++ 618, /* GL_INVERT */
++ 1021, /* GL_OR_REVERSE */
++ 270, /* GL_COPY_INVERTED */
++ 1020, /* GL_OR_INVERTED */
++ 947, /* GL_NAND */
++ 1335, /* GL_SET */
++ 424, /* GL_EMISSION */
++ 1343, /* GL_SHININESS */
++ 48, /* GL_AMBIENT_AND_DIFFUSE */
++ 165, /* GL_COLOR_INDEXES */
++ 897, /* GL_MODELVIEW */
++ 1189, /* GL_PROJECTION */
++ 1441, /* GL_TEXTURE */
++ 138, /* GL_COLOR */
++ 313, /* GL_DEPTH */
++ 1395, /* GL_STENCIL */
++ 164, /* GL_COLOR_INDEX */
++ 1409, /* GL_STENCIL_INDEX */
++ 322, /* GL_DEPTH_COMPONENT */
++ 1230, /* GL_RED */
++ 548, /* GL_GREEN */
++ 89, /* GL_BLUE */
++ 31, /* GL_ALPHA */
++ 1254, /* GL_RGB */
++ 1273, /* GL_RGBA */
++ 668, /* GL_LUMINANCE */
++ 689, /* GL_LUMINANCE_ALPHA */
++ 73, /* GL_BITMAP */
++ 1069, /* GL_POINT */
++ 638, /* GL_LINE */
++ 442, /* GL_FILL */
++ 1239, /* GL_RENDER */
++ 438, /* GL_FEEDBACK */
++ 1329, /* GL_SELECT */
++ 443, /* GL_FLAT */
++ 1348, /* GL_SMOOTH */
++ 619, /* GL_KEEP */
++ 1248, /* GL_REPLACE */
++ 575, /* GL_INCR */
++ 309, /* GL_DECR */
++ 1674, /* GL_VENDOR */
++ 1245, /* GL_RENDERER */
++ 1675, /* GL_VERSION */
++ 431, /* GL_EXTENSIONS */
++ 1294, /* GL_S */
++ 1432, /* GL_T */
++ 1220, /* GL_R */
++ 1209, /* GL_Q */
++ 933, /* GL_MODULATE */
++ 308, /* GL_DECAL */
++ 1577, /* GL_TEXTURE_ENV_MODE */
++ 1576, /* GL_TEXTURE_ENV_COLOR */
++ 1575, /* GL_TEXTURE_ENV */
++ 432, /* GL_EYE_LINEAR */
++ 980, /* GL_OBJECT_LINEAR */
++ 1374, /* GL_SPHERE_MAP */
++ 1579, /* GL_TEXTURE_GEN_MODE */
++ 982, /* GL_OBJECT_PLANE */
++ 433, /* GL_EYE_PLANE */
++ 948, /* GL_NEAREST */
++ 639, /* GL_LINEAR */
++ 952, /* GL_NEAREST_MIPMAP_NEAREST */
++ 644, /* GL_LINEAR_MIPMAP_NEAREST */
++ 951, /* GL_NEAREST_MIPMAP_LINEAR */
++ 643, /* GL_LINEAR_MIPMAP_LINEAR */
++ 1600, /* GL_TEXTURE_MAG_FILTER */
++ 1608, /* GL_TEXTURE_MIN_FILTER */
++ 1621, /* GL_TEXTURE_WRAP_S */
++ 1622, /* GL_TEXTURE_WRAP_T */
++ 117, /* GL_CLAMP */
++ 1247, /* GL_REPEAT */
++ 1107, /* GL_POLYGON_OFFSET_UNITS */
++ 1106, /* GL_POLYGON_OFFSET_POINT */
++ 1105, /* GL_POLYGON_OFFSET_LINE */
++ 1221, /* GL_R3_G3_B2 */
++ 1671, /* GL_V2F */
++ 1672, /* GL_V3F */
++ 114, /* GL_C4UB_V2F */
++ 115, /* GL_C4UB_V3F */
++ 112, /* GL_C3F_V3F */
++ 945, /* GL_N3F_V3F */
++ 113, /* GL_C4F_N3F_V3F */
++ 1437, /* GL_T2F_V3F */
++ 1439, /* GL_T4F_V4F */
++ 1435, /* GL_T2F_C4UB_V3F */
++ 1433, /* GL_T2F_C3F_V3F */
++ 1436, /* GL_T2F_N3F_V3F */
++ 1434, /* GL_T2F_C4F_N3F_V3F */
++ 1438, /* GL_T4F_C4F_N3F_V4F */
++ 130, /* GL_CLIP_PLANE0 */
++ 131, /* GL_CLIP_PLANE1 */
++ 132, /* GL_CLIP_PLANE2 */
++ 133, /* GL_CLIP_PLANE3 */
++ 134, /* GL_CLIP_PLANE4 */
++ 135, /* GL_CLIP_PLANE5 */
++ 623, /* GL_LIGHT0 */
++ 624, /* GL_LIGHT1 */
++ 625, /* GL_LIGHT2 */
++ 626, /* GL_LIGHT3 */
++ 627, /* GL_LIGHT4 */
++ 628, /* GL_LIGHT5 */
++ 629, /* GL_LIGHT6 */
++ 630, /* GL_LIGHT7 */
++ 552, /* GL_HINT_BIT */
++ 247, /* GL_CONSTANT_COLOR */
++ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
++ 242, /* GL_CONSTANT_ALPHA */
++ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
++ 76, /* GL_BLEND_COLOR */
++ 512, /* GL_FUNC_ADD */
++ 881, /* GL_MIN */
++ 793, /* GL_MAX */
++ 81, /* GL_BLEND_EQUATION */
++ 516, /* GL_FUNC_SUBTRACT */
++ 514, /* GL_FUNC_REVERSE_SUBTRACT */
++ 250, /* GL_CONVOLUTION_1D */
++ 251, /* GL_CONVOLUTION_2D */
++ 1332, /* GL_SEPARABLE_2D */
++ 254, /* GL_CONVOLUTION_BORDER_MODE */
++ 258, /* GL_CONVOLUTION_FILTER_SCALE */
++ 256, /* GL_CONVOLUTION_FILTER_BIAS */
++ 1231, /* GL_REDUCE */
++ 260, /* GL_CONVOLUTION_FORMAT */
++ 264, /* GL_CONVOLUTION_WIDTH */
++ 262, /* GL_CONVOLUTION_HEIGHT */
++ 808, /* GL_MAX_CONVOLUTION_WIDTH */
++ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
++ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
++ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
++ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
++ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
++ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
++ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
++ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
++ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
++ 553, /* GL_HISTOGRAM */
++ 1193, /* GL_PROXY_HISTOGRAM */
++ 569, /* GL_HISTOGRAM_WIDTH */
++ 559, /* GL_HISTOGRAM_FORMAT */
++ 565, /* GL_HISTOGRAM_RED_SIZE */
++ 561, /* GL_HISTOGRAM_GREEN_SIZE */
++ 556, /* GL_HISTOGRAM_BLUE_SIZE */
++ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
++ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
++ 567, /* GL_HISTOGRAM_SINK */
++ 882, /* GL_MINMAX */
++ 884, /* GL_MINMAX_FORMAT */
++ 886, /* GL_MINMAX_SINK */
++ 1440, /* GL_TABLE_TOO_LARGE_EXT */
++ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
++ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
++ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
++ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
++ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
++ 1104, /* GL_POLYGON_OFFSET_FILL */
++ 1103, /* GL_POLYGON_OFFSET_FACTOR */
++ 1102, /* GL_POLYGON_OFFSET_BIAS */
++ 1251, /* GL_RESCALE_NORMAL */
++ 36, /* GL_ALPHA4 */
++ 38, /* GL_ALPHA8 */
++ 32, /* GL_ALPHA12 */
++ 34, /* GL_ALPHA16 */
++ 679, /* GL_LUMINANCE4 */
++ 685, /* GL_LUMINANCE8 */
++ 669, /* GL_LUMINANCE12 */
++ 675, /* GL_LUMINANCE16 */
++ 680, /* GL_LUMINANCE4_ALPHA4 */
++ 683, /* GL_LUMINANCE6_ALPHA2 */
++ 686, /* GL_LUMINANCE8_ALPHA8 */
++ 672, /* GL_LUMINANCE12_ALPHA4 */
++ 670, /* GL_LUMINANCE12_ALPHA12 */
++ 676, /* GL_LUMINANCE16_ALPHA16 */
++ 593, /* GL_INTENSITY */
++ 598, /* GL_INTENSITY4 */
++ 600, /* GL_INTENSITY8 */
++ 594, /* GL_INTENSITY12 */
++ 596, /* GL_INTENSITY16 */
++ 1263, /* GL_RGB2_EXT */
++ 1264, /* GL_RGB4 */
++ 1267, /* GL_RGB5 */
++ 1271, /* GL_RGB8 */
++ 1255, /* GL_RGB10 */
++ 1259, /* GL_RGB12 */
++ 1261, /* GL_RGB16 */
++ 1278, /* GL_RGBA2 */
++ 1280, /* GL_RGBA4 */
++ 1268, /* GL_RGB5_A1 */
++ 1284, /* GL_RGBA8 */
++ 1256, /* GL_RGB10_A2 */
++ 1274, /* GL_RGBA12 */
++ 1276, /* GL_RGBA16 */
++ 1613, /* GL_TEXTURE_RED_SIZE */
++ 1585, /* GL_TEXTURE_GREEN_SIZE */
++ 1524, /* GL_TEXTURE_BLUE_SIZE */
++ 1511, /* GL_TEXTURE_ALPHA_SIZE */
++ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
++ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
++ 1249, /* GL_REPLACE_EXT */
++ 1197, /* GL_PROXY_TEXTURE_1D */
++ 1200, /* GL_PROXY_TEXTURE_2D */
++ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
++ 1610, /* GL_TEXTURE_PRIORITY */
++ 1615, /* GL_TEXTURE_RESIDENT */
++ 1514, /* GL_TEXTURE_BINDING_1D */
++ 1516, /* GL_TEXTURE_BINDING_2D */
++ 1518, /* GL_TEXTURE_BINDING_3D */
++ 1028, /* GL_PACK_SKIP_IMAGES */
++ 1024, /* GL_PACK_IMAGE_HEIGHT */
++ 1646, /* GL_UNPACK_SKIP_IMAGES */
++ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
++ 1510, /* GL_TEXTURE_3D */
++ 1203, /* GL_PROXY_TEXTURE_3D */
++ 1572, /* GL_TEXTURE_DEPTH */
++ 1620, /* GL_TEXTURE_WRAP_R */
++ 794, /* GL_MAX_3D_TEXTURE_SIZE */
++ 1676, /* GL_VERTEX_ARRAY */
++ 959, /* GL_NORMAL_ARRAY */
++ 139, /* GL_COLOR_ARRAY */
++ 578, /* GL_INDEX_ARRAY */
++ 1551, /* GL_TEXTURE_COORD_ARRAY */
++ 415, /* GL_EDGE_FLAG_ARRAY */
++ 1681, /* GL_VERTEX_ARRAY_SIZE */
++ 1683, /* GL_VERTEX_ARRAY_TYPE */
++ 1682, /* GL_VERTEX_ARRAY_STRIDE */
++ 964, /* GL_NORMAL_ARRAY_TYPE */
++ 963, /* GL_NORMAL_ARRAY_STRIDE */
++ 143, /* GL_COLOR_ARRAY_SIZE */
++ 145, /* GL_COLOR_ARRAY_TYPE */
++ 144, /* GL_COLOR_ARRAY_STRIDE */
++ 583, /* GL_INDEX_ARRAY_TYPE */
++ 582, /* GL_INDEX_ARRAY_STRIDE */
++ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
++ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
++ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
++ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
++ 1680, /* GL_VERTEX_ARRAY_POINTER */
++ 962, /* GL_NORMAL_ARRAY_POINTER */
++ 142, /* GL_COLOR_ARRAY_POINTER */
++ 581, /* GL_INDEX_ARRAY_POINTER */
++ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
++ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
++ 938, /* GL_MULTISAMPLE */
++ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
++ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
++ 1313, /* GL_SAMPLE_COVERAGE */
++ 1310, /* GL_SAMPLE_BUFFERS */
++ 1301, /* GL_SAMPLES */
++ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
++ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
++ 170, /* GL_COLOR_MATRIX */
++ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
++ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
++ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
++ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
++ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
++ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
++ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
++ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
++ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
++ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
++ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
++ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
++ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
++ 80, /* GL_BLEND_DST_RGB */
++ 88, /* GL_BLEND_SRC_RGB */
++ 79, /* GL_BLEND_DST_ALPHA */
++ 87, /* GL_BLEND_SRC_ALPHA */
++ 176, /* GL_COLOR_TABLE */
++ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
++ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
++ 1192, /* GL_PROXY_COLOR_TABLE */
++ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
++ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
++ 200, /* GL_COLOR_TABLE_SCALE */
++ 180, /* GL_COLOR_TABLE_BIAS */
++ 185, /* GL_COLOR_TABLE_FORMAT */
++ 202, /* GL_COLOR_TABLE_WIDTH */
++ 197, /* GL_COLOR_TABLE_RED_SIZE */
++ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
++ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
++ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
++ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
++ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
++ 71, /* GL_BGR */
++ 72, /* GL_BGRA */
++ 816, /* GL_MAX_ELEMENTS_VERTICES */
++ 815, /* GL_MAX_ELEMENTS_INDICES */
++ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
++ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
++ 1086, /* GL_POINT_SIZE_MIN */
++ 1082, /* GL_POINT_SIZE_MAX */
++ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
++ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
++ 118, /* GL_CLAMP_TO_BORDER */
++ 121, /* GL_CLAMP_TO_EDGE */
++ 1609, /* GL_TEXTURE_MIN_LOD */
++ 1607, /* GL_TEXTURE_MAX_LOD */
++ 1513, /* GL_TEXTURE_BASE_LEVEL */
++ 1606, /* GL_TEXTURE_MAX_LEVEL */
++ 572, /* GL_IGNORE_BORDER_HP */
++ 246, /* GL_CONSTANT_BORDER_HP */
++ 1250, /* GL_REPLICATE_BORDER_HP */
++ 252, /* GL_CONVOLUTION_BORDER_COLOR */
++ 987, /* GL_OCCLUSION_TEST_HP */
++ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
++ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
++ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
++ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
++ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
++ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
++ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
++ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
++ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
++ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
++ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
++ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
++ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
++ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
++ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
++ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
++ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
++ 518, /* GL_GENERATE_MIPMAP */
++ 519, /* GL_GENERATE_MIPMAP_HINT */
++ 481, /* GL_FOG_OFFSET_SGIX */
++ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
++ 1542, /* GL_TEXTURE_COMPARE_SGIX */
++ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
++ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
++ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
++ 323, /* GL_DEPTH_COMPONENT16 */
++ 326, /* GL_DEPTH_COMPONENT24 */
++ 329, /* GL_DEPTH_COMPONENT32 */
++ 274, /* GL_CULL_VERTEX_EXT */
++ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
++ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
++ 1737, /* GL_WRAP_BORDER_SUN */
++ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
++ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
++ 1345, /* GL_SINGLE_COLOR */
++ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
++ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
++ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
++ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
++ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
++ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
++ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
++ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
++ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
++ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
++ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
++ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
++ 889, /* GL_MIRRORED_REPEAT */
++ 1289, /* GL_RGB_S3TC */
++ 1266, /* GL_RGB4_S3TC */
++ 1288, /* GL_RGBA_S3TC */
++ 1283, /* GL_RGBA4_S3TC */
++ 1286, /* GL_RGBA_DXT5_S3TC */
++ 1281, /* GL_RGBA4_DXT5_S3TC */
++ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
++ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
++ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
++ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
++ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
++ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
++ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
++ 468, /* GL_FOG_COORDINATE_SOURCE */
++ 460, /* GL_FOG_COORD */
++ 484, /* GL_FRAGMENT_DEPTH */
++ 280, /* GL_CURRENT_FOG_COORD */
++ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
++ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
++ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
++ 462, /* GL_FOG_COORDINATE_ARRAY */
++ 174, /* GL_COLOR_SUM */
++ 299, /* GL_CURRENT_SECONDARY_COLOR */
++ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
++ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
++ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
++ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
++ 1322, /* GL_SECONDARY_COLOR_ARRAY */
++ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
++ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
++ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
++ 1442, /* GL_TEXTURE0 */
++ 1444, /* GL_TEXTURE1 */
++ 1466, /* GL_TEXTURE2 */
++ 1488, /* GL_TEXTURE3 */
++ 1494, /* GL_TEXTURE4 */
++ 1496, /* GL_TEXTURE5 */
++ 1498, /* GL_TEXTURE6 */
++ 1500, /* GL_TEXTURE7 */
++ 1502, /* GL_TEXTURE8 */
++ 1504, /* GL_TEXTURE9 */
++ 1445, /* GL_TEXTURE10 */
++ 1447, /* GL_TEXTURE11 */
++ 1449, /* GL_TEXTURE12 */
++ 1451, /* GL_TEXTURE13 */
++ 1453, /* GL_TEXTURE14 */
++ 1455, /* GL_TEXTURE15 */
++ 1457, /* GL_TEXTURE16 */
++ 1459, /* GL_TEXTURE17 */
++ 1461, /* GL_TEXTURE18 */
++ 1463, /* GL_TEXTURE19 */
++ 1467, /* GL_TEXTURE20 */
++ 1469, /* GL_TEXTURE21 */
++ 1471, /* GL_TEXTURE22 */
++ 1473, /* GL_TEXTURE23 */
++ 1475, /* GL_TEXTURE24 */
++ 1477, /* GL_TEXTURE25 */
++ 1479, /* GL_TEXTURE26 */
++ 1481, /* GL_TEXTURE27 */
++ 1483, /* GL_TEXTURE28 */
++ 1485, /* GL_TEXTURE29 */
++ 1489, /* GL_TEXTURE30 */
++ 1491, /* GL_TEXTURE31 */
++ 18, /* GL_ACTIVE_TEXTURE */
++ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
++ 867, /* GL_MAX_TEXTURE_UNITS */
++ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
++ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
++ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
++ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
++ 1430, /* GL_SUBTRACT */
++ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
++ 222, /* GL_COMPRESSED_ALPHA */
++ 226, /* GL_COMPRESSED_LUMINANCE */
++ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
++ 224, /* GL_COMPRESSED_INTENSITY */
++ 230, /* GL_COMPRESSED_RGB */
++ 231, /* GL_COMPRESSED_RGBA */
++ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
++ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
++ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
++ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
++ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
++ 335, /* GL_DEPTH_STENCIL_NV */
++ 1655, /* GL_UNSIGNED_INT_24_8_NV */
++ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
++ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
++ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
++ 1578, /* GL_TEXTURE_FILTER_CONTROL */
++ 1593, /* GL_TEXTURE_LOD_BIAS */
++ 207, /* GL_COMBINE4 */
++ 857, /* GL_MAX_SHININESS_NV */
++ 858, /* GL_MAX_SPOT_EXPONENT_NV */
++ 576, /* GL_INCR_WRAP */
++ 310, /* GL_DECR_WRAP */
++ 909, /* GL_MODELVIEW1_ARB */
++ 965, /* GL_NORMAL_MAP */
++ 1236, /* GL_REFLECTION_MAP */
++ 1558, /* GL_TEXTURE_CUBE_MAP */
++ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
++ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
++ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
++ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
++ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
++ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
++ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
++ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
++ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
++ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
++ 476, /* GL_FOG_DISTANCE_MODE_NV */
++ 435, /* GL_EYE_RADIAL_NV */
++ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
++ 206, /* GL_COMBINE */
++ 213, /* GL_COMBINE_RGB */
++ 208, /* GL_COMBINE_ALPHA */
++ 1290, /* GL_RGB_SCALE */
++ 24, /* GL_ADD_SIGNED */
++ 603, /* GL_INTERPOLATE */
++ 241, /* GL_CONSTANT */
++ 1155, /* GL_PRIMARY_COLOR */
++ 1152, /* GL_PREVIOUS */
++ 1356, /* GL_SOURCE0_RGB */
++ 1362, /* GL_SOURCE1_RGB */
++ 1368, /* GL_SOURCE2_RGB */
++ 1372, /* GL_SOURCE3_RGB_NV */
++ 1353, /* GL_SOURCE0_ALPHA */
++ 1359, /* GL_SOURCE1_ALPHA */
++ 1365, /* GL_SOURCE2_ALPHA */
++ 1371, /* GL_SOURCE3_ALPHA_NV */
++ 1001, /* GL_OPERAND0_RGB */
++ 1007, /* GL_OPERAND1_RGB */
++ 1013, /* GL_OPERAND2_RGB */
++ 1017, /* GL_OPERAND3_RGB_NV */
++ 998, /* GL_OPERAND0_ALPHA */
++ 1004, /* GL_OPERAND1_ALPHA */
++ 1010, /* GL_OPERAND2_ALPHA */
++ 1016, /* GL_OPERAND3_ALPHA_NV */
++ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
++ 1741, /* GL_YCBCR_422_APPLE */
++ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
++ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
++ 1347, /* GL_SLICE_ACCUM_SUN */
++ 1212, /* GL_QUAD_MESH_SUN */
++ 1639, /* GL_TRIANGLE_MESH_SUN */
++ 1715, /* GL_VERTEX_PROGRAM_ARB */
++ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
++ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
++ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
++ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
++ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
++ 301, /* GL_CURRENT_VERTEX_ATTRIB */
++ 1168, /* GL_PROGRAM_LENGTH_ARB */
++ 1182, /* GL_PROGRAM_STRING_ARB */
++ 931, /* GL_MODELVIEW_PROJECTION_NV */
++ 571, /* GL_IDENTITY_NV */
++ 616, /* GL_INVERSE_NV */
++ 1632, /* GL_TRANSPOSE_NV */
++ 617, /* GL_INVERSE_TRANSPOSE_NV */
++ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
++ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
++ 747, /* GL_MATRIX0_NV */
++ 759, /* GL_MATRIX1_NV */
++ 771, /* GL_MATRIX2_NV */
++ 775, /* GL_MATRIX3_NV */
++ 777, /* GL_MATRIX4_NV */
++ 779, /* GL_MATRIX5_NV */
++ 781, /* GL_MATRIX6_NV */
++ 783, /* GL_MATRIX7_NV */
++ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
++ 283, /* GL_CURRENT_MATRIX_ARB */
++ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
++ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
++ 1180, /* GL_PROGRAM_PARAMETER_NV */
++ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
++ 1184, /* GL_PROGRAM_TARGET_NV */
++ 1181, /* GL_PROGRAM_RESIDENT_NV */
++ 1624, /* GL_TRACK_MATRIX_NV */
++ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
++ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
++ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
++ 320, /* GL_DEPTH_CLAMP_NV */
++ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
++ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
++ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
++ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
++ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
++ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
++ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
++ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
++ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
++ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
++ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
++ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
++ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
++ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
++ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
++ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
++ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
++ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
++ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
++ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
++ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
++ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
++ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
++ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
++ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
++ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
++ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
++ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
++ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
++ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
++ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
++ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
++ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
++ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
++ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
++ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
++ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
++ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
++ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
++ 1161, /* GL_PROGRAM_BINDING_ARB */
++ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
++ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
++ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
++ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
++ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
++ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
++ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
++ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
++ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
++ 1544, /* GL_TEXTURE_COMPRESSED */
++ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
++ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
++ 879, /* GL_MAX_VERTEX_UNITS_ARB */
++ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
++ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
++ 1714, /* GL_VERTEX_BLEND_ARB */
++ 303, /* GL_CURRENT_WEIGHT_ARB */
++ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
++ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
++ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
++ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
++ 1729, /* GL_WEIGHT_ARRAY_ARB */
++ 346, /* GL_DOT3_RGB */
++ 347, /* GL_DOT3_RGBA */
++ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
++ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
++ 939, /* GL_MULTISAMPLE_3DFX */
++ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
++ 1302, /* GL_SAMPLES_3DFX */
++ 920, /* GL_MODELVIEW2_ARB */
++ 923, /* GL_MODELVIEW3_ARB */
++ 924, /* GL_MODELVIEW4_ARB */
++ 925, /* GL_MODELVIEW5_ARB */
++ 926, /* GL_MODELVIEW6_ARB */
++ 927, /* GL_MODELVIEW7_ARB */
++ 928, /* GL_MODELVIEW8_ARB */
++ 929, /* GL_MODELVIEW9_ARB */
++ 899, /* GL_MODELVIEW10_ARB */
++ 900, /* GL_MODELVIEW11_ARB */
++ 901, /* GL_MODELVIEW12_ARB */
++ 902, /* GL_MODELVIEW13_ARB */
++ 903, /* GL_MODELVIEW14_ARB */
++ 904, /* GL_MODELVIEW15_ARB */
++ 905, /* GL_MODELVIEW16_ARB */
++ 906, /* GL_MODELVIEW17_ARB */
++ 907, /* GL_MODELVIEW18_ARB */
++ 908, /* GL_MODELVIEW19_ARB */
++ 910, /* GL_MODELVIEW20_ARB */
++ 911, /* GL_MODELVIEW21_ARB */
++ 912, /* GL_MODELVIEW22_ARB */
++ 913, /* GL_MODELVIEW23_ARB */
++ 914, /* GL_MODELVIEW24_ARB */
++ 915, /* GL_MODELVIEW25_ARB */
++ 916, /* GL_MODELVIEW26_ARB */
++ 917, /* GL_MODELVIEW27_ARB */
++ 918, /* GL_MODELVIEW28_ARB */
++ 919, /* GL_MODELVIEW29_ARB */
++ 921, /* GL_MODELVIEW30_ARB */
++ 922, /* GL_MODELVIEW31_ARB */
++ 351, /* GL_DOT3_RGB_EXT */
++ 349, /* GL_DOT3_RGBA_EXT */
++ 893, /* GL_MIRROR_CLAMP_EXT */
++ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
++ 934, /* GL_MODULATE_ADD_ATI */
++ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
++ 936, /* GL_MODULATE_SUBTRACT_ATI */
++ 1742, /* GL_YCBCR_MESA */
++ 1025, /* GL_PACK_INVERT_MESA */
++ 306, /* GL_DEBUG_OBJECT_MESA */
++ 307, /* GL_DEBUG_PRINT_MESA */
++ 305, /* GL_DEBUG_ASSERT_MESA */
++ 107, /* GL_BUFFER_SIZE */
++ 109, /* GL_BUFFER_USAGE */
++ 1398, /* GL_STENCIL_BACK_FUNC */
++ 1397, /* GL_STENCIL_BACK_FAIL */
++ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
++ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
++ 485, /* GL_FRAGMENT_PROGRAM_ARB */
++ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
++ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
++ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
++ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
++ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
++ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
++ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
++ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
++ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
++ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
++ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
++ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
++ 812, /* GL_MAX_DRAW_BUFFERS */
++ 355, /* GL_DRAW_BUFFER0 */
++ 358, /* GL_DRAW_BUFFER1 */
++ 379, /* GL_DRAW_BUFFER2 */
++ 382, /* GL_DRAW_BUFFER3 */
++ 385, /* GL_DRAW_BUFFER4 */
++ 388, /* GL_DRAW_BUFFER5 */
++ 391, /* GL_DRAW_BUFFER6 */
++ 394, /* GL_DRAW_BUFFER7 */
++ 397, /* GL_DRAW_BUFFER8 */
++ 400, /* GL_DRAW_BUFFER9 */
++ 359, /* GL_DRAW_BUFFER10 */
++ 362, /* GL_DRAW_BUFFER11 */
++ 365, /* GL_DRAW_BUFFER12 */
++ 368, /* GL_DRAW_BUFFER13 */
++ 371, /* GL_DRAW_BUFFER14 */
++ 374, /* GL_DRAW_BUFFER15 */
++ 82, /* GL_BLEND_EQUATION_ALPHA */
++ 792, /* GL_MATRIX_PALETTE_ARB */
++ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
++ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
++ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
++ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
++ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
++ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
++ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
++ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
++ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
++ 1573, /* GL_TEXTURE_DEPTH_SIZE */
++ 339, /* GL_DEPTH_TEXTURE_MODE */
++ 1539, /* GL_TEXTURE_COMPARE_MODE */
++ 1537, /* GL_TEXTURE_COMPARE_FUNC */
++ 217, /* GL_COMPARE_R_TO_TEXTURE */
++ 1093, /* GL_POINT_SPRITE */
++ 266, /* GL_COORD_REPLACE */
++ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
++ 1214, /* GL_QUERY_COUNTER_BITS */
++ 291, /* GL_CURRENT_QUERY */
++ 1216, /* GL_QUERY_RESULT */
++ 1218, /* GL_QUERY_RESULT_AVAILABLE */
++ 873, /* GL_MAX_VERTEX_ATTRIBS */
++ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
++ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
++ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
++ 859, /* GL_MAX_TEXTURE_COORDS */
++ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
++ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
++ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
++ 1165, /* GL_PROGRAM_FORMAT_ARB */
++ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
++ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
++ 317, /* GL_DEPTH_BOUNDS_EXT */
++ 52, /* GL_ARRAY_BUFFER */
++ 420, /* GL_ELEMENT_ARRAY_BUFFER */
++ 54, /* GL_ARRAY_BUFFER_BINDING */
++ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
++ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
++ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
++ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
++ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
++ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
++ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
++ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
++ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
++ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
++ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
++ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
++ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
++ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
++ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
++ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
++ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
++ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
++ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
++ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
++ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
++ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
++ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
++ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
++ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
++ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
++ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
++ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
++ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
++ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
++ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
++ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
++ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
++ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
++ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
++ 1226, /* GL_READ_ONLY */
++ 1738, /* GL_WRITE_ONLY */
++ 1228, /* GL_READ_WRITE */
++ 101, /* GL_BUFFER_ACCESS */
++ 103, /* GL_BUFFER_MAPPED */
++ 105, /* GL_BUFFER_MAP_POINTER */
++ 1623, /* GL_TIME_ELAPSED_EXT */
++ 746, /* GL_MATRIX0_ARB */
++ 758, /* GL_MATRIX1_ARB */
++ 770, /* GL_MATRIX2_ARB */
++ 774, /* GL_MATRIX3_ARB */
++ 776, /* GL_MATRIX4_ARB */
++ 778, /* GL_MATRIX5_ARB */
++ 780, /* GL_MATRIX6_ARB */
++ 782, /* GL_MATRIX7_ARB */
++ 784, /* GL_MATRIX8_ARB */
++ 785, /* GL_MATRIX9_ARB */
++ 748, /* GL_MATRIX10_ARB */
++ 749, /* GL_MATRIX11_ARB */
++ 750, /* GL_MATRIX12_ARB */
++ 751, /* GL_MATRIX13_ARB */
++ 752, /* GL_MATRIX14_ARB */
++ 753, /* GL_MATRIX15_ARB */
++ 754, /* GL_MATRIX16_ARB */
++ 755, /* GL_MATRIX17_ARB */
++ 756, /* GL_MATRIX18_ARB */
++ 757, /* GL_MATRIX19_ARB */
++ 760, /* GL_MATRIX20_ARB */
++ 761, /* GL_MATRIX21_ARB */
++ 762, /* GL_MATRIX22_ARB */
++ 763, /* GL_MATRIX23_ARB */
++ 764, /* GL_MATRIX24_ARB */
++ 765, /* GL_MATRIX25_ARB */
++ 766, /* GL_MATRIX26_ARB */
++ 767, /* GL_MATRIX27_ARB */
++ 768, /* GL_MATRIX28_ARB */
++ 769, /* GL_MATRIX29_ARB */
++ 772, /* GL_MATRIX30_ARB */
++ 773, /* GL_MATRIX31_ARB */
++ 1425, /* GL_STREAM_DRAW */
++ 1427, /* GL_STREAM_READ */
++ 1423, /* GL_STREAM_COPY */
++ 1391, /* GL_STATIC_DRAW */
++ 1393, /* GL_STATIC_READ */
++ 1389, /* GL_STATIC_COPY */
++ 410, /* GL_DYNAMIC_DRAW */
++ 412, /* GL_DYNAMIC_READ */
++ 408, /* GL_DYNAMIC_COPY */
++ 535, /* GL_GL_PIXEL_PACK_BUFFER */
++ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
++ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
++ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
++ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
++ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
++ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
++ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
++ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
++ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
++ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
++ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
++ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
++ 1304, /* GL_SAMPLES_PASSED */
++ 486, /* GL_FRAGMENT_SHADER */
++ 1724, /* GL_VERTEX_SHADER */
++ 1178, /* GL_PROGRAM_OBJECT_ARB */
++ 1336, /* GL_SHADER_OBJECT_ARB */
++ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
++ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
++ 871, /* GL_MAX_VARYING_FLOATS */
++ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
++ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
++ 985, /* GL_OBJECT_TYPE_ARB */
++ 1338, /* GL_SHADER_TYPE */
++ 451, /* GL_FLOAT_VEC2 */
++ 453, /* GL_FLOAT_VEC3 */
++ 455, /* GL_FLOAT_VEC4 */
++ 606, /* GL_INT_VEC2 */
++ 608, /* GL_INT_VEC3 */
++ 610, /* GL_INT_VEC4 */
++ 93, /* GL_BOOL */
++ 95, /* GL_BOOL_VEC2 */
++ 97, /* GL_BOOL_VEC3 */
++ 99, /* GL_BOOL_VEC4 */
++ 445, /* GL_FLOAT_MAT2 */
++ 447, /* GL_FLOAT_MAT3 */
++ 449, /* GL_FLOAT_MAT4 */
++ 1295, /* GL_SAMPLER_1D */
++ 1297, /* GL_SAMPLER_2D */
++ 1299, /* GL_SAMPLER_3D */
++ 1300, /* GL_SAMPLER_CUBE */
++ 1296, /* GL_SAMPLER_1D_SHADOW */
++ 1298, /* GL_SAMPLER_2D_SHADOW */
++ 529, /* GL_GL_FLOAT_MAT2x3 */
++ 530, /* GL_GL_FLOAT_MAT2x4 */
++ 531, /* GL_GL_FLOAT_MAT3x2 */
++ 532, /* GL_GL_FLOAT_MAT3x4 */
++ 533, /* GL_GL_FLOAT_MAT4x2 */
++ 534, /* GL_GL_FLOAT_MAT4x3 */
++ 312, /* GL_DELETE_STATUS */
++ 221, /* GL_COMPILE_STATUS */
++ 659, /* GL_LINK_STATUS */
++ 1673, /* GL_VALIDATE_STATUS */
++ 591, /* GL_INFO_LOG_LENGTH */
++ 56, /* GL_ATTACHED_SHADERS */
++ 20, /* GL_ACTIVE_UNIFORMS */
++ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
++ 1337, /* GL_SHADER_SOURCE_LENGTH */
++ 15, /* GL_ACTIVE_ATTRIBUTES */
++ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
++ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
++ 1340, /* GL_SHADING_LANGUAGE_VERSION */
++ 290, /* GL_CURRENT_PROGRAM */
++ 1034, /* GL_PALETTE4_RGB8_OES */
++ 1036, /* GL_PALETTE4_RGBA8_OES */
++ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
++ 1035, /* GL_PALETTE4_RGBA4_OES */
++ 1033, /* GL_PALETTE4_RGB5_A1_OES */
++ 1039, /* GL_PALETTE8_RGB8_OES */
++ 1041, /* GL_PALETTE8_RGBA8_OES */
++ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
++ 1040, /* GL_PALETTE8_RGBA4_OES */
++ 1038, /* GL_PALETTE8_RGB5_A1_OES */
++ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
++ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
++ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
++ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
++ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
++ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
++ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
++ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
++ 543, /* GL_GL_SRGB */
++ 544, /* GL_GL_SRGB8 */
++ 546, /* GL_GL_SRGB_ALPHA */
++ 545, /* GL_GL_SRGB8_ALPHA8 */
++ 542, /* GL_GL_SLUMINANCE_ALPHA */
++ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
++ 539, /* GL_GL_SLUMINANCE */
++ 540, /* GL_GL_SLUMINANCE8 */
++ 526, /* GL_GL_COMPRESSED_SRGB */
++ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
++ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
++ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
++ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
++ 667, /* GL_LOWER_LEFT */
++ 1670, /* GL_UPPER_LEFT */
++ 1401, /* GL_STENCIL_BACK_REF */
++ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
++ 1403, /* GL_STENCIL_BACK_WRITEMASK */
++ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
++ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
++ 1225, /* GL_READ_FRAMEBUFFER_EXT */
++ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
++ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
++ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
++ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
++ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
++ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
++ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
++ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
++ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
++ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
++ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
++ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
++ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
++ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
++ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
++ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
++ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
++ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
++ 146, /* GL_COLOR_ATTACHMENT0_EXT */
++ 153, /* GL_COLOR_ATTACHMENT1_EXT */
++ 154, /* GL_COLOR_ATTACHMENT2_EXT */
++ 155, /* GL_COLOR_ATTACHMENT3_EXT */
++ 156, /* GL_COLOR_ATTACHMENT4_EXT */
++ 157, /* GL_COLOR_ATTACHMENT5_EXT */
++ 158, /* GL_COLOR_ATTACHMENT6_EXT */
++ 159, /* GL_COLOR_ATTACHMENT7_EXT */
++ 160, /* GL_COLOR_ATTACHMENT8_EXT */
++ 161, /* GL_COLOR_ATTACHMENT9_EXT */
++ 147, /* GL_COLOR_ATTACHMENT10_EXT */
++ 148, /* GL_COLOR_ATTACHMENT11_EXT */
++ 149, /* GL_COLOR_ATTACHMENT12_EXT */
++ 150, /* GL_COLOR_ATTACHMENT13_EXT */
++ 151, /* GL_COLOR_ATTACHMENT14_EXT */
++ 152, /* GL_COLOR_ATTACHMENT15_EXT */
++ 314, /* GL_DEPTH_ATTACHMENT_EXT */
++ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
++ 497, /* GL_FRAMEBUFFER_EXT */
++ 1241, /* GL_RENDERBUFFER_EXT */
++ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
++ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
++ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
++ 1414, /* GL_STENCIL_INDEX_EXT */
++ 1411, /* GL_STENCIL_INDEX1_EXT */
++ 1412, /* GL_STENCIL_INDEX4_EXT */
++ 1413, /* GL_STENCIL_INDEX8_EXT */
++ 1410, /* GL_STENCIL_INDEX16_EXT */
++ 428, /* GL_EVAL_BIT */
++ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
++ 661, /* GL_LIST_BIT */
++ 1523, /* GL_TEXTURE_BIT */
++ 1319, /* GL_SCISSOR_BIT */
++ 29, /* GL_ALL_ATTRIB_BITS */
++ 941, /* GL_MULTISAMPLE_BIT */
++ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
++};
++
++#define Elements(x) sizeof(x)/sizeof(*x)
++
++typedef int (*cfunc)(const void *, const void *);
++
++/**
++ * Compare a key name to an element in the \c all_enums array.
++ *
++ * \c bsearch always passes the key as the first parameter and the pointer
++ * to the array element as the second parameter. We can elimiate some
++ * extra work by taking advantage of that fact.
++ *
++ * \param a Pointer to the desired enum name.
++ * \param b Pointer to an element of the \c all_enums array.
++ */
++static int compar_name( const char *a, const enum_elt *b )
++{
++ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
++}
++
++/**
++ * Compare a key enum value to an element in the \c all_enums array.
++ *
++ * \c bsearch always passes the key as the first parameter and the pointer
++ * to the array element as the second parameter. We can elimiate some
++ * extra work by taking advantage of that fact.
++ *
++ * \param a Pointer to the desired enum name.
++ * \param b Pointer to an index into the \c all_enums array.
++ */
++static int compar_nr( const int *a, const unsigned *b )
++{
++ return a[0] - all_enums[*b].n;
++}
++
++
++static char token_tmp[20];
++
++const char *_mesa_lookup_enum_by_nr( int nr )
++{
++ unsigned * i;
++
++ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
++ sizeof(reduced_enums[0]), (cfunc) compar_nr );
++
++ if ( i != NULL ) {
++ return & enum_string_table[ all_enums[ *i ].offset ];
++ }
++ else {
++ /* this is not re-entrant safe, no big deal here */
++ _mesa_sprintf(token_tmp, "0x%x", nr);
++ return token_tmp;
++ }
++}
++
++int _mesa_lookup_enum_by_name( const char *symbol )
++{
++ enum_elt * f = NULL;
++
++ if ( symbol != NULL ) {
++ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
++ sizeof( enum_elt ), (cfunc) compar_name );
++ }
++
++ return (f != NULL) ? f->n : -1;
++}
++
++
+Index: trunk/target-i386/mesa_get.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/mesa_get.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,5563 @@
++
++/***
++ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
++ ***/
++
++#include "glheader.h"
++#include "context.h"
++#include "enable.h"
++#include "extensions.h"
++#include "fbobject.h"
++#include "get.h"
++#include "macros.h"
++#include "mtypes.h"
++#include "state.h"
++#include "texcompress.h"
++
++
++#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
++
++#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
++
++#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
++#define ENUM_TO_INT(E) ( (GLint) (E) )
++#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
++
++#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
++#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
++
++
++/*
++ * Check if named extension is enabled, if not generate error and return.
++ */
++#define CHECK_EXT1(EXT1, FUNC) \
++ if (!ctx->Extensions.EXT1) { \
++ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
++ return; \
++ }
++
++/*
++ * Check if either of two extensions is enabled.
++ */
++#define CHECK_EXT2(EXT1, EXT2, FUNC) \
++ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
++ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
++ return; \
++ }
++
++/*
++ * Check if either of three extensions is enabled.
++ */
++#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
++ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
++ !ctx->Extensions.EXT3) { \
++ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
++ return; \
++ }
++
++/*
++ * Check if either of four extensions is enabled.
++ */
++#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
++ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
++ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
++ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
++ return; \
++ }
++
++
++void GLAPIENTRY
++_mesa_GetBooleanv( GLenum pname, GLboolean *params )
++{
++ GET_CURRENT_CONTEXT(ctx);
++ ASSERT_OUTSIDE_BEGIN_END(ctx);
++
++ if (!params)
++ return;
++
++ if (ctx->NewState)
++ _mesa_update_state(ctx);
++
++ if (ctx->Driver.GetBooleanv &&
++ ctx->Driver.GetBooleanv(ctx, pname, params))
++ return;
++
++ switch (pname) {
++ case GL_ACCUM_RED_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
++ break;
++ case GL_ACCUM_GREEN_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
++ break;
++ case GL_ACCUM_BLUE_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
++ break;
++ case GL_ACCUM_ALPHA_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
++ break;
++ case GL_ACCUM_CLEAR_VALUE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
++ break;
++ case GL_ALPHA_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
++ break;
++ case GL_ALPHA_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
++ break;
++ case GL_ALPHA_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
++ break;
++ case GL_ALPHA_TEST:
++ params[0] = ctx->Color.AlphaEnabled;
++ break;
++ case GL_ALPHA_TEST_FUNC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
++ break;
++ case GL_ALPHA_TEST_REF:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
++ break;
++ case GL_ATTRIB_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
++ break;
++ case GL_AUTO_NORMAL:
++ params[0] = ctx->Eval.AutoNormal;
++ break;
++ case GL_AUX_BUFFERS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
++ break;
++ case GL_BLEND:
++ params[0] = ctx->Color.BlendEnabled;
++ break;
++ case GL_BLEND_DST:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_SRC_RGB_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_DST_RGB_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC_ALPHA_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
++ break;
++ case GL_BLEND_DST_ALPHA_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
++ break;
++ case GL_BLEND_EQUATION:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
++ break;
++ case GL_BLEND_EQUATION_ALPHA_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
++ break;
++ case GL_BLEND_COLOR_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
++ break;
++ case GL_BLUE_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
++ break;
++ case GL_BLUE_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
++ break;
++ case GL_BLUE_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
++ break;
++ case GL_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
++ break;
++ case GL_CLIP_PLANE0:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
++ break;
++ case GL_CLIP_PLANE1:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
++ break;
++ case GL_CLIP_PLANE2:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
++ break;
++ case GL_CLIP_PLANE3:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
++ break;
++ case GL_CLIP_PLANE4:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
++ break;
++ case GL_CLIP_PLANE5:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
++ break;
++ case GL_COLOR_CLEAR_VALUE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
++ break;
++ case GL_COLOR_MATERIAL:
++ params[0] = ctx->Light.ColorMaterialEnabled;
++ break;
++ case GL_COLOR_MATERIAL_FACE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
++ break;
++ case GL_COLOR_MATERIAL_PARAMETER:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
++ break;
++ case GL_COLOR_WRITEMASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
++ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
++ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
++ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
++ break;
++ case GL_CULL_FACE:
++ params[0] = ctx->Polygon.CullFlag;
++ break;
++ case GL_CULL_FACE_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
++ break;
++ case GL_CURRENT_COLOR:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
++ }
++ break;
++ case GL_CURRENT_INDEX:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
++ }
++ break;
++ case GL_CURRENT_NORMAL:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
++ }
++ break;
++ case GL_CURRENT_RASTER_COLOR:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
++ break;
++ case GL_CURRENT_RASTER_DISTANCE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
++ break;
++ case GL_CURRENT_RASTER_INDEX:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
++ break;
++ case GL_CURRENT_RASTER_POSITION:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
++ break;
++ case GL_CURRENT_RASTER_SECONDARY_COLOR:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
++ break;
++ case GL_CURRENT_RASTER_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
++ }
++ break;
++ case GL_CURRENT_RASTER_POSITION_VALID:
++ params[0] = ctx->Current.RasterPosValid;
++ break;
++ case GL_CURRENT_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
++ }
++ break;
++ case GL_DEPTH_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
++ break;
++ case GL_DEPTH_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
++ break;
++ case GL_DEPTH_CLEAR_VALUE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
++ break;
++ case GL_DEPTH_FUNC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
++ break;
++ case GL_DEPTH_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
++ break;
++ case GL_DEPTH_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
++ break;
++ case GL_DEPTH_TEST:
++ params[0] = ctx->Depth.Test;
++ break;
++ case GL_DEPTH_WRITEMASK:
++ params[0] = ctx->Depth.Mask;
++ break;
++ case GL_DITHER:
++ params[0] = ctx->Color.DitherFlag;
++ break;
++ case GL_DOUBLEBUFFER:
++ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
++ break;
++ case GL_DRAW_BUFFER:
++ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_EDGE_FLAG:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.EdgeFlag;
++ }
++ break;
++ case GL_FEEDBACK_BUFFER_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
++ break;
++ case GL_FEEDBACK_BUFFER_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
++ break;
++ case GL_FOG:
++ params[0] = ctx->Fog.Enabled;
++ break;
++ case GL_FOG_COLOR:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
++ break;
++ case GL_FOG_DENSITY:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
++ break;
++ case GL_FOG_END:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
++ break;
++ case GL_FOG_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
++ break;
++ case GL_FOG_INDEX:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
++ break;
++ case GL_FOG_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
++ break;
++ case GL_FOG_START:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
++ break;
++ case GL_FRONT_FACE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
++ break;
++ case GL_GREEN_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
++ break;
++ case GL_GREEN_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
++ break;
++ case GL_GREEN_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
++ break;
++ case GL_INDEX_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
++ break;
++ case GL_INDEX_CLEAR_VALUE:
++ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
++ break;
++ case GL_INDEX_MODE:
++ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
++ break;
++ case GL_INDEX_OFFSET:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
++ break;
++ case GL_INDEX_SHIFT:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
++ break;
++ case GL_INDEX_WRITEMASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
++ break;
++ case GL_LIGHT0:
++ params[0] = ctx->Light.Light[0].Enabled;
++ break;
++ case GL_LIGHT1:
++ params[0] = ctx->Light.Light[1].Enabled;
++ break;
++ case GL_LIGHT2:
++ params[0] = ctx->Light.Light[2].Enabled;
++ break;
++ case GL_LIGHT3:
++ params[0] = ctx->Light.Light[3].Enabled;
++ break;
++ case GL_LIGHT4:
++ params[0] = ctx->Light.Light[4].Enabled;
++ break;
++ case GL_LIGHT5:
++ params[0] = ctx->Light.Light[5].Enabled;
++ break;
++ case GL_LIGHT6:
++ params[0] = ctx->Light.Light[6].Enabled;
++ break;
++ case GL_LIGHT7:
++ params[0] = ctx->Light.Light[7].Enabled;
++ break;
++ case GL_LIGHTING:
++ params[0] = ctx->Light.Enabled;
++ break;
++ case GL_LIGHT_MODEL_AMBIENT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
++ break;
++ case GL_LIGHT_MODEL_COLOR_CONTROL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
++ break;
++ case GL_LIGHT_MODEL_LOCAL_VIEWER:
++ params[0] = ctx->Light.Model.LocalViewer;
++ break;
++ case GL_LIGHT_MODEL_TWO_SIDE:
++ params[0] = ctx->Light.Model.TwoSide;
++ break;
++ case GL_LINE_SMOOTH:
++ params[0] = ctx->Line.SmoothFlag;
++ break;
++ case GL_LINE_SMOOTH_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
++ break;
++ case GL_LINE_STIPPLE:
++ params[0] = ctx->Line.StippleFlag;
++ break;
++ case GL_LINE_STIPPLE_PATTERN:
++ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
++ break;
++ case GL_LINE_STIPPLE_REPEAT:
++ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
++ break;
++ case GL_LINE_WIDTH:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
++ break;
++ case GL_LINE_WIDTH_GRANULARITY:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
++ break;
++ case GL_LINE_WIDTH_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
++ break;
++ case GL_ALIASED_LINE_WIDTH_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
++ break;
++ case GL_LIST_BASE:
++ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
++ break;
++ case GL_LIST_INDEX:
++ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
++ break;
++ case GL_LIST_MODE:
++ {
++ GLenum mode;
++ if (!ctx->CompileFlag)
++ mode = 0;
++ else if (ctx->ExecuteFlag)
++ mode = GL_COMPILE_AND_EXECUTE;
++ else
++ mode = GL_COMPILE;
++ params[0] = ENUM_TO_BOOLEAN(mode);
++ }
++ break;
++ case GL_INDEX_LOGIC_OP:
++ params[0] = ctx->Color.IndexLogicOpEnabled;
++ break;
++ case GL_COLOR_LOGIC_OP:
++ params[0] = ctx->Color.ColorLogicOpEnabled;
++ break;
++ case GL_LOGIC_OP_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
++ break;
++ case GL_MAP1_COLOR_4:
++ params[0] = ctx->Eval.Map1Color4;
++ break;
++ case GL_MAP1_GRID_DOMAIN:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
++ break;
++ case GL_MAP1_GRID_SEGMENTS:
++ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
++ break;
++ case GL_MAP1_INDEX:
++ params[0] = ctx->Eval.Map1Index;
++ break;
++ case GL_MAP1_NORMAL:
++ params[0] = ctx->Eval.Map1Normal;
++ break;
++ case GL_MAP1_TEXTURE_COORD_1:
++ params[0] = ctx->Eval.Map1TextureCoord1;
++ break;
++ case GL_MAP1_TEXTURE_COORD_2:
++ params[0] = ctx->Eval.Map1TextureCoord2;
++ break;
++ case GL_MAP1_TEXTURE_COORD_3:
++ params[0] = ctx->Eval.Map1TextureCoord3;
++ break;
++ case GL_MAP1_TEXTURE_COORD_4:
++ params[0] = ctx->Eval.Map1TextureCoord4;
++ break;
++ case GL_MAP1_VERTEX_3:
++ params[0] = ctx->Eval.Map1Vertex3;
++ break;
++ case GL_MAP1_VERTEX_4:
++ params[0] = ctx->Eval.Map1Vertex4;
++ break;
++ case GL_MAP2_COLOR_4:
++ params[0] = ctx->Eval.Map2Color4;
++ break;
++ case GL_MAP2_GRID_DOMAIN:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
++ break;
++ case GL_MAP2_GRID_SEGMENTS:
++ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
++ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
++ break;
++ case GL_MAP2_INDEX:
++ params[0] = ctx->Eval.Map2Index;
++ break;
++ case GL_MAP2_NORMAL:
++ params[0] = ctx->Eval.Map2Normal;
++ break;
++ case GL_MAP2_TEXTURE_COORD_1:
++ params[0] = ctx->Eval.Map2TextureCoord1;
++ break;
++ case GL_MAP2_TEXTURE_COORD_2:
++ params[0] = ctx->Eval.Map2TextureCoord2;
++ break;
++ case GL_MAP2_TEXTURE_COORD_3:
++ params[0] = ctx->Eval.Map2TextureCoord3;
++ break;
++ case GL_MAP2_TEXTURE_COORD_4:
++ params[0] = ctx->Eval.Map2TextureCoord4;
++ break;
++ case GL_MAP2_VERTEX_3:
++ params[0] = ctx->Eval.Map2Vertex3;
++ break;
++ case GL_MAP2_VERTEX_4:
++ params[0] = ctx->Eval.Map2Vertex4;
++ break;
++ case GL_MAP_COLOR:
++ params[0] = ctx->Pixel.MapColorFlag;
++ break;
++ case GL_MAP_STENCIL:
++ params[0] = ctx->Pixel.MapStencilFlag;
++ break;
++ case GL_MATRIX_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
++ break;
++ case GL_MAX_ATTRIB_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
++ break;
++ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
++ break;
++ case GL_MAX_CLIP_PLANES:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
++ break;
++ case GL_MAX_ELEMENTS_VERTICES:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
++ break;
++ case GL_MAX_ELEMENTS_INDICES:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
++ break;
++ case GL_MAX_EVAL_ORDER:
++ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
++ break;
++ case GL_MAX_LIGHTS:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
++ break;
++ case GL_MAX_LIST_NESTING:
++ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
++ break;
++ case GL_MAX_MODELVIEW_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
++ break;
++ case GL_MAX_NAME_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
++ break;
++ case GL_MAX_PIXEL_MAP_TABLE:
++ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
++ break;
++ case GL_MAX_PROJECTION_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
++ break;
++ case GL_MAX_TEXTURE_SIZE:
++ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
++ break;
++ case GL_MAX_3D_TEXTURE_SIZE:
++ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
++ break;
++ case GL_MAX_TEXTURE_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
++ break;
++ case GL_MAX_VIEWPORT_DIMS:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
++ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
++ break;
++ case GL_MODELVIEW_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_MODELVIEW_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
++ break;
++ case GL_NAME_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
++ break;
++ case GL_NORMALIZE:
++ params[0] = ctx->Transform.Normalize;
++ break;
++ case GL_PACK_ALIGNMENT:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
++ break;
++ case GL_PACK_LSB_FIRST:
++ params[0] = ctx->Pack.LsbFirst;
++ break;
++ case GL_PACK_ROW_LENGTH:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
++ break;
++ case GL_PACK_SKIP_PIXELS:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
++ break;
++ case GL_PACK_SKIP_ROWS:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
++ break;
++ case GL_PACK_SWAP_BYTES:
++ params[0] = ctx->Pack.SwapBytes;
++ break;
++ case GL_PACK_SKIP_IMAGES_EXT:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
++ break;
++ case GL_PACK_IMAGE_HEIGHT_EXT:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
++ break;
++ case GL_PACK_INVERT_MESA:
++ params[0] = ctx->Pack.Invert;
++ break;
++ case GL_PERSPECTIVE_CORRECTION_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
++ break;
++ case GL_PIXEL_MAP_A_TO_A_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
++ break;
++ case GL_PIXEL_MAP_B_TO_B_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
++ break;
++ case GL_PIXEL_MAP_G_TO_G_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_A_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_B_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_G_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_I_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_R_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
++ break;
++ case GL_PIXEL_MAP_R_TO_R_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
++ break;
++ case GL_PIXEL_MAP_S_TO_S_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
++ break;
++ case GL_POINT_SIZE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
++ break;
++ case GL_POINT_SIZE_GRANULARITY:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
++ break;
++ case GL_POINT_SIZE_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
++ break;
++ case GL_ALIASED_POINT_SIZE_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
++ break;
++ case GL_POINT_SMOOTH:
++ params[0] = ctx->Point.SmoothFlag;
++ break;
++ case GL_POINT_SMOOTH_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
++ break;
++ case GL_POINT_SIZE_MIN_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
++ break;
++ case GL_POINT_SIZE_MAX_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
++ break;
++ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
++ break;
++ case GL_DISTANCE_ATTENUATION_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
++ break;
++ case GL_POLYGON_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
++ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
++ break;
++ case GL_POLYGON_OFFSET_BIAS_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
++ break;
++ case GL_POLYGON_OFFSET_FACTOR:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
++ break;
++ case GL_POLYGON_OFFSET_UNITS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
++ break;
++ case GL_POLYGON_SMOOTH:
++ params[0] = ctx->Polygon.SmoothFlag;
++ break;
++ case GL_POLYGON_SMOOTH_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
++ break;
++ case GL_POLYGON_STIPPLE:
++ params[0] = ctx->Polygon.StippleFlag;
++ break;
++ case GL_PROJECTION_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_PROJECTION_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
++ break;
++ case GL_READ_BUFFER:
++ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
++ break;
++ case GL_RED_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
++ break;
++ case GL_RED_BITS:
++ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
++ break;
++ case GL_RED_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
++ break;
++ case GL_RENDER_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
++ break;
++ case GL_RESCALE_NORMAL:
++ params[0] = ctx->Transform.RescaleNormals;
++ break;
++ case GL_RGBA_MODE:
++ params[0] = ctx->DrawBuffer->Visual.rgbMode;
++ break;
++ case GL_SCISSOR_BOX:
++ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
++ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
++ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
++ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
++ break;
++ case GL_SCISSOR_TEST:
++ params[0] = ctx->Scissor.Enabled;
++ break;
++ case GL_SELECTION_BUFFER_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
++ break;
++ case GL_SHADE_MODEL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
++ break;
++ case GL_SHARED_TEXTURE_PALETTE_EXT:
++ params[0] = ctx->Texture.SharedPalette;
++ break;
++ case GL_STENCIL_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
++ break;
++ case GL_STENCIL_CLEAR_VALUE:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
++ break;
++ case GL_STENCIL_FAIL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_FUNC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_REF:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_TEST:
++ params[0] = ctx->Stencil.Enabled;
++ break;
++ case GL_STENCIL_VALUE_MASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_WRITEMASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STEREO:
++ params[0] = ctx->DrawBuffer->Visual.stereoMode;
++ break;
++ case GL_SUBPIXEL_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
++ break;
++ case GL_TEXTURE_1D:
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
++ break;
++ case GL_TEXTURE_2D:
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
++ break;
++ case GL_TEXTURE_3D:
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
++ break;
++ case GL_TEXTURE_BINDING_1D:
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
++ break;
++ case GL_TEXTURE_BINDING_2D:
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
++ break;
++ case GL_TEXTURE_BINDING_3D:
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
++ break;
++ case GL_TEXTURE_ENV_COLOR:
++ {
++ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
++ params[0] = FLOAT_TO_BOOLEAN(color[0]);
++ params[1] = FLOAT_TO_BOOLEAN(color[1]);
++ params[2] = FLOAT_TO_BOOLEAN(color[2]);
++ params[3] = FLOAT_TO_BOOLEAN(color[3]);
++ }
++ break;
++ case GL_TEXTURE_ENV_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
++ break;
++ case GL_TEXTURE_GEN_S:
++ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
++ break;
++ case GL_TEXTURE_GEN_T:
++ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
++ break;
++ case GL_TEXTURE_GEN_R:
++ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
++ break;
++ case GL_TEXTURE_GEN_Q:
++ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
++ break;
++ case GL_TEXTURE_MATRIX:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TEXTURE_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
++ break;
++ case GL_UNPACK_ALIGNMENT:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
++ break;
++ case GL_UNPACK_LSB_FIRST:
++ params[0] = ctx->Unpack.LsbFirst;
++ break;
++ case GL_UNPACK_ROW_LENGTH:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
++ break;
++ case GL_UNPACK_SKIP_PIXELS:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
++ break;
++ case GL_UNPACK_SKIP_ROWS:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
++ break;
++ case GL_UNPACK_SWAP_BYTES:
++ params[0] = ctx->Unpack.SwapBytes;
++ break;
++ case GL_UNPACK_SKIP_IMAGES_EXT:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
++ break;
++ case GL_UNPACK_IMAGE_HEIGHT_EXT:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
++ break;
++ case GL_UNPACK_CLIENT_STORAGE_APPLE:
++ params[0] = ctx->Unpack.ClientStorage;
++ break;
++ case GL_VIEWPORT:
++ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
++ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
++ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
++ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
++ break;
++ case GL_ZOOM_X:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
++ break;
++ case GL_ZOOM_Y:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
++ break;
++ case GL_VERTEX_ARRAY:
++ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
++ break;
++ case GL_VERTEX_ARRAY_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
++ break;
++ case GL_VERTEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
++ break;
++ case GL_VERTEX_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
++ break;
++ case GL_VERTEX_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_NORMAL_ARRAY:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
++ break;
++ case GL_NORMAL_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
++ break;
++ case GL_NORMAL_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
++ break;
++ case GL_NORMAL_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_COLOR_ARRAY:
++ params[0] = ctx->Array.ArrayObj->Color.Enabled;
++ break;
++ case GL_COLOR_ARRAY_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
++ break;
++ case GL_COLOR_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
++ break;
++ case GL_COLOR_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
++ break;
++ case GL_COLOR_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_INDEX_ARRAY:
++ params[0] = ctx->Array.ArrayObj->Index.Enabled;
++ break;
++ case GL_INDEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
++ break;
++ case GL_INDEX_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
++ break;
++ case GL_INDEX_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_TEXTURE_COORD_ARRAY:
++ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
++ break;
++ case GL_TEXTURE_COORD_ARRAY_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_EDGE_FLAG_ARRAY:
++ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
++ break;
++ case GL_EDGE_FLAG_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
++ break;
++ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_MAX_TEXTURE_UNITS_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
++ break;
++ case GL_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
++ break;
++ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
++ break;
++ case GL_TEXTURE_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
++ break;
++ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
++ break;
++ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
++ break;
++ case GL_TEXTURE_COMPRESSION_HINT_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
++ break;
++ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
++ break;
++ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
++ {
++ GLint formats[100];
++ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
++ ASSERT(n <= 100);
++ for (i = 0; i < n; i++)
++ params[i] = ENUM_TO_INT(formats[i]);
++ }
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
++ break;
++ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_COLOR_MATRIX_SGI:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
++ break;
++ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
++ break;
++ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
++ break;
++ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
++ break;
++ case GL_CONVOLUTION_1D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = ctx->Pixel.Convolution1DEnabled;
++ break;
++ case GL_CONVOLUTION_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = ctx->Pixel.Convolution2DEnabled;
++ break;
++ case GL_SEPARABLE_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = ctx->Pixel.Separable2DEnabled;
++ break;
++ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
++ break;
++ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
++ break;
++ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
++ break;
++ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
++ break;
++ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
++ break;
++ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
++ break;
++ case GL_HISTOGRAM:
++ CHECK_EXT1(EXT_histogram, "GetBooleanv");
++ params[0] = ctx->Pixel.HistogramEnabled;
++ break;
++ case GL_MINMAX:
++ CHECK_EXT1(EXT_histogram, "GetBooleanv");
++ params[0] = ctx->Pixel.MinMaxEnabled;
++ break;
++ case GL_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetBooleanv");
++ params[0] = ctx->Pixel.ColorTableEnabled;
++ break;
++ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetBooleanv");
++ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
++ break;
++ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetBooleanv");
++ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
++ break;
++ case GL_TEXTURE_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
++ break;
++ case GL_COLOR_SUM_EXT:
++ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
++ params[0] = ctx->Fog.ColorSumEnabled;
++ break;
++ case GL_CURRENT_SECONDARY_COLOR_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
++ }
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
++ break;
++ case GL_CURRENT_FOG_COORDINATE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
++ }
++ break;
++ case GL_FOG_COORDINATE_ARRAY_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
++ break;
++ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
++ break;
++ case GL_FOG_COORDINATE_SOURCE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
++ break;
++ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
++ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
++ break;
++ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
++ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
++ break;
++ case GL_MULTISAMPLE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.Enabled;
++ break;
++ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.SampleAlphaToCoverage;
++ break;
++ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.SampleAlphaToOne;
++ break;
++ case GL_SAMPLE_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.SampleCoverage;
++ break;
++ case GL_SAMPLE_COVERAGE_VALUE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
++ break;
++ case GL_SAMPLE_COVERAGE_INVERT_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.SampleCoverageInvert;
++ break;
++ case GL_SAMPLE_BUFFERS_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
++ break;
++ case GL_SAMPLES_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
++ break;
++ case GL_RASTER_POSITION_UNCLIPPED_IBM:
++ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
++ params[0] = ctx->Transform.RasterPositionUnclipped;
++ break;
++ case GL_POINT_SPRITE_NV:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
++ params[0] = ctx->Point.PointSprite;
++ break;
++ case GL_POINT_SPRITE_R_MODE_NV:
++ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
++ break;
++ case GL_POINT_SPRITE_COORD_ORIGIN:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
++ break;
++ case GL_GENERATE_MIPMAP_HINT_SGIS:
++ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
++ break;
++ case GL_VERTEX_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY0_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY1_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY2_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY3_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY5_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY6_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY7_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY8_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY9_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY10_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY11_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY12_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY13_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY14_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY15_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
++ break;
++ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[0];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[1];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[2];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[3];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[4];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[5];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[6];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[7];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[8];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[9];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[10];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[11];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[12];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[13];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[14];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[15];
++ break;
++ case GL_FRAGMENT_PROGRAM_NV:
++ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
++ params[0] = ctx->FragmentProgram.Enabled;
++ break;
++ case GL_FRAGMENT_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
++ break;
++ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
++ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
++ break;
++ case GL_TEXTURE_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
++ break;
++ case GL_TEXTURE_BINDING_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
++ break;
++ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
++ break;
++ case GL_STENCIL_TEST_TWO_SIDE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
++ params[0] = ctx->Stencil.TestTwoSide;
++ break;
++ case GL_ACTIVE_STENCIL_FACE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
++ break;
++ case GL_MAX_SHININESS_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
++ break;
++ case GL_MAX_SPOT_EXPONENT_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
++ break;
++ case GL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
++ break;
++ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
++ break;
++ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
++ break;
++ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
++ break;
++ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
++ break;
++ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
++ break;
++ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
++ break;
++ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
++ break;
++ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
++ break;
++ case GL_VERTEX_PROGRAM_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->VertexProgram.Enabled;
++ break;
++ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->VertexProgram.PointSizeEnabled;
++ break;
++ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->VertexProgram.TwoSideEnabled;
++ break;
++ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
++ break;
++ case GL_MAX_PROGRAM_MATRICES_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
++ break;
++ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->CurrentStack->Depth + 1;
++ break;
++ case GL_CURRENT_MATRIX_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
++ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_MAX_VERTEX_ATTRIBS_ARB:
++ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
++ break;
++ case GL_PROGRAM_ERROR_POSITION_ARB:
++ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
++ break;
++ case GL_FRAGMENT_PROGRAM_ARB:
++ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
++ params[0] = ctx->FragmentProgram.Enabled;
++ break;
++ case GL_MAX_TEXTURE_COORDS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
++ break;
++ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
++ break;
++ case GL_DEPTH_BOUNDS_TEST_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
++ params[0] = ctx->Depth.BoundsTest;
++ break;
++ case GL_DEPTH_BOUNDS_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
++ break;
++ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
++ params[0] = ctx->FragmentProgram.CallbackEnabled;
++ break;
++ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
++ params[0] = ctx->VertexProgram.CallbackEnabled;
++ break;
++ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
++ break;
++ case GL_VERTEX_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
++ break;
++ case GL_MAX_DRAW_BUFFERS_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
++ break;
++ case GL_DRAW_BUFFER0_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_DRAW_BUFFER1_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
++ params[0] = ENUM_TO_BOOLEAN(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER2_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
++ params[0] = ENUM_TO_BOOLEAN(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER3_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
++ params[0] = ENUM_TO_BOOLEAN(buffer);
++ }
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
++ CHECK_EXT1(OES_read_format, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
++ CHECK_EXT1(OES_read_format, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
++ break;
++ case GL_NUM_FRAGMENT_REGISTERS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(6);
++ break;
++ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(8);
++ break;
++ case GL_NUM_PASSES_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(2);
++ break;
++ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(8);
++ break;
++ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(16);
++ break;
++ case GL_COLOR_ALPHA_PAIRING_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = GL_TRUE;
++ break;
++ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(3);
++ break;
++ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(3);
++ break;
++ case GL_STENCIL_BACK_FUNC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
++ break;
++ case GL_STENCIL_BACK_VALUE_MASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
++ break;
++ case GL_STENCIL_BACK_REF:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
++ break;
++ case GL_STENCIL_BACK_FAIL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
++ break;
++ case GL_FRAMEBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
++ break;
++ case GL_RENDERBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
++ break;
++ case GL_MAX_COLOR_ATTACHMENTS_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
++ break;
++ case GL_MAX_RENDERBUFFER_SIZE_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
++ break;
++ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
++ break;
++ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
++ break;
++ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
++ break;
++ case GL_MAX_VARYING_FLOATS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
++ break;
++ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
++ break;
++ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
++ break;
++ default:
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
++ }
++}
++
++void GLAPIENTRY
++_mesa_GetFloatv( GLenum pname, GLfloat *params )
++{
++ GET_CURRENT_CONTEXT(ctx);
++ ASSERT_OUTSIDE_BEGIN_END(ctx);
++
++ if (!params)
++ return;
++
++ if (ctx->NewState)
++ _mesa_update_state(ctx);
++
++ if (ctx->Driver.GetFloatv &&
++ ctx->Driver.GetFloatv(ctx, pname, params))
++ return;
++
++ switch (pname) {
++ case GL_ACCUM_RED_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
++ break;
++ case GL_ACCUM_GREEN_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
++ break;
++ case GL_ACCUM_BLUE_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
++ break;
++ case GL_ACCUM_ALPHA_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
++ break;
++ case GL_ACCUM_CLEAR_VALUE:
++ params[0] = ctx->Accum.ClearColor[0];
++ params[1] = ctx->Accum.ClearColor[1];
++ params[2] = ctx->Accum.ClearColor[2];
++ params[3] = ctx->Accum.ClearColor[3];
++ break;
++ case GL_ALPHA_BIAS:
++ params[0] = ctx->Pixel.AlphaBias;
++ break;
++ case GL_ALPHA_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
++ break;
++ case GL_ALPHA_SCALE:
++ params[0] = ctx->Pixel.AlphaScale;
++ break;
++ case GL_ALPHA_TEST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
++ break;
++ case GL_ALPHA_TEST_FUNC:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
++ break;
++ case GL_ALPHA_TEST_REF:
++ params[0] = ctx->Color.AlphaRef;
++ break;
++ case GL_ATTRIB_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->AttribStackDepth);
++ break;
++ case GL_AUTO_NORMAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
++ break;
++ case GL_AUX_BUFFERS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
++ break;
++ case GL_BLEND:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
++ break;
++ case GL_BLEND_DST:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_SRC_RGB_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_DST_RGB_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC_ALPHA_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
++ break;
++ case GL_BLEND_DST_ALPHA_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
++ break;
++ case GL_BLEND_EQUATION:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
++ break;
++ case GL_BLEND_EQUATION_ALPHA_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
++ break;
++ case GL_BLEND_COLOR_EXT:
++ params[0] = ctx->Color.BlendColor[0];
++ params[1] = ctx->Color.BlendColor[1];
++ params[2] = ctx->Color.BlendColor[2];
++ params[3] = ctx->Color.BlendColor[3];
++ break;
++ case GL_BLUE_BIAS:
++ params[0] = ctx->Pixel.BlueBias;
++ break;
++ case GL_BLUE_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
++ break;
++ case GL_BLUE_SCALE:
++ params[0] = ctx->Pixel.BlueScale;
++ break;
++ case GL_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
++ break;
++ case GL_CLIP_PLANE0:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
++ break;
++ case GL_CLIP_PLANE1:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
++ break;
++ case GL_CLIP_PLANE2:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
++ break;
++ case GL_CLIP_PLANE3:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
++ break;
++ case GL_CLIP_PLANE4:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
++ break;
++ case GL_CLIP_PLANE5:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
++ break;
++ case GL_COLOR_CLEAR_VALUE:
++ params[0] = ctx->Color.ClearColor[0];
++ params[1] = ctx->Color.ClearColor[1];
++ params[2] = ctx->Color.ClearColor[2];
++ params[3] = ctx->Color.ClearColor[3];
++ break;
++ case GL_COLOR_MATERIAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
++ break;
++ case GL_COLOR_MATERIAL_FACE:
++ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
++ break;
++ case GL_COLOR_MATERIAL_PARAMETER:
++ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
++ break;
++ case GL_COLOR_WRITEMASK:
++ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
++ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
++ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
++ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
++ break;
++ case GL_CULL_FACE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
++ break;
++ case GL_CULL_FACE_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
++ break;
++ case GL_CURRENT_COLOR:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
++ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
++ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
++ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
++ }
++ break;
++ case GL_CURRENT_INDEX:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
++ }
++ break;
++ case GL_CURRENT_NORMAL:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
++ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
++ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
++ }
++ break;
++ case GL_CURRENT_RASTER_COLOR:
++ params[0] = ctx->Current.RasterColor[0];
++ params[1] = ctx->Current.RasterColor[1];
++ params[2] = ctx->Current.RasterColor[2];
++ params[3] = ctx->Current.RasterColor[3];
++ break;
++ case GL_CURRENT_RASTER_DISTANCE:
++ params[0] = ctx->Current.RasterDistance;
++ break;
++ case GL_CURRENT_RASTER_INDEX:
++ params[0] = ctx->Current.RasterIndex;
++ break;
++ case GL_CURRENT_RASTER_POSITION:
++ params[0] = ctx->Current.RasterPos[0];
++ params[1] = ctx->Current.RasterPos[1];
++ params[2] = ctx->Current.RasterPos[2];
++ params[3] = ctx->Current.RasterPos[3];
++ break;
++ case GL_CURRENT_RASTER_SECONDARY_COLOR:
++ params[0] = ctx->Current.RasterSecondaryColor[0];
++ params[1] = ctx->Current.RasterSecondaryColor[1];
++ params[2] = ctx->Current.RasterSecondaryColor[2];
++ params[3] = ctx->Current.RasterSecondaryColor[3];
++ break;
++ case GL_CURRENT_RASTER_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
++ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
++ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
++ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
++ }
++ break;
++ case GL_CURRENT_RASTER_POSITION_VALID:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
++ break;
++ case GL_CURRENT_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
++ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
++ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
++ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
++ }
++ break;
++ case GL_DEPTH_BIAS:
++ params[0] = ctx->Pixel.DepthBias;
++ break;
++ case GL_DEPTH_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
++ break;
++ case GL_DEPTH_CLEAR_VALUE:
++ params[0] = ctx->Depth.Clear;
++ break;
++ case GL_DEPTH_FUNC:
++ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
++ break;
++ case GL_DEPTH_RANGE:
++ params[0] = ctx->Viewport.Near;
++ params[1] = ctx->Viewport.Far;
++ break;
++ case GL_DEPTH_SCALE:
++ params[0] = ctx->Pixel.DepthScale;
++ break;
++ case GL_DEPTH_TEST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
++ break;
++ case GL_DEPTH_WRITEMASK:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
++ break;
++ case GL_DITHER:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
++ break;
++ case GL_DOUBLEBUFFER:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
++ break;
++ case GL_DRAW_BUFFER:
++ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_EDGE_FLAG:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
++ }
++ break;
++ case GL_FEEDBACK_BUFFER_SIZE:
++ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
++ break;
++ case GL_FEEDBACK_BUFFER_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
++ break;
++ case GL_FOG:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
++ break;
++ case GL_FOG_COLOR:
++ params[0] = ctx->Fog.Color[0];
++ params[1] = ctx->Fog.Color[1];
++ params[2] = ctx->Fog.Color[2];
++ params[3] = ctx->Fog.Color[3];
++ break;
++ case GL_FOG_DENSITY:
++ params[0] = ctx->Fog.Density;
++ break;
++ case GL_FOG_END:
++ params[0] = ctx->Fog.End;
++ break;
++ case GL_FOG_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
++ break;
++ case GL_FOG_INDEX:
++ params[0] = ctx->Fog.Index;
++ break;
++ case GL_FOG_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
++ break;
++ case GL_FOG_START:
++ params[0] = ctx->Fog.Start;
++ break;
++ case GL_FRONT_FACE:
++ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
++ break;
++ case GL_GREEN_BIAS:
++ params[0] = ctx->Pixel.GreenBias;
++ break;
++ case GL_GREEN_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
++ break;
++ case GL_GREEN_SCALE:
++ params[0] = ctx->Pixel.GreenScale;
++ break;
++ case GL_INDEX_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
++ break;
++ case GL_INDEX_CLEAR_VALUE:
++ params[0] = (GLfloat)(ctx->Color.ClearIndex);
++ break;
++ case GL_INDEX_MODE:
++ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
++ break;
++ case GL_INDEX_OFFSET:
++ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
++ break;
++ case GL_INDEX_SHIFT:
++ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
++ break;
++ case GL_INDEX_WRITEMASK:
++ params[0] = (GLfloat)(ctx->Color.IndexMask);
++ break;
++ case GL_LIGHT0:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
++ break;
++ case GL_LIGHT1:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
++ break;
++ case GL_LIGHT2:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
++ break;
++ case GL_LIGHT3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
++ break;
++ case GL_LIGHT4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
++ break;
++ case GL_LIGHT5:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
++ break;
++ case GL_LIGHT6:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
++ break;
++ case GL_LIGHT7:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
++ break;
++ case GL_LIGHTING:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
++ break;
++ case GL_LIGHT_MODEL_AMBIENT:
++ params[0] = ctx->Light.Model.Ambient[0];
++ params[1] = ctx->Light.Model.Ambient[1];
++ params[2] = ctx->Light.Model.Ambient[2];
++ params[3] = ctx->Light.Model.Ambient[3];
++ break;
++ case GL_LIGHT_MODEL_COLOR_CONTROL:
++ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
++ break;
++ case GL_LIGHT_MODEL_LOCAL_VIEWER:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
++ break;
++ case GL_LIGHT_MODEL_TWO_SIDE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
++ break;
++ case GL_LINE_SMOOTH:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
++ break;
++ case GL_LINE_SMOOTH_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
++ break;
++ case GL_LINE_STIPPLE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
++ break;
++ case GL_LINE_STIPPLE_PATTERN:
++ params[0] = (GLfloat)(ctx->Line.StipplePattern);
++ break;
++ case GL_LINE_STIPPLE_REPEAT:
++ params[0] = (GLfloat)(ctx->Line.StippleFactor);
++ break;
++ case GL_LINE_WIDTH:
++ params[0] = ctx->Line.Width;
++ break;
++ case GL_LINE_WIDTH_GRANULARITY:
++ params[0] = ctx->Const.LineWidthGranularity;
++ break;
++ case GL_LINE_WIDTH_RANGE:
++ params[0] = ctx->Const.MinLineWidthAA;
++ params[1] = ctx->Const.MaxLineWidthAA;
++ break;
++ case GL_ALIASED_LINE_WIDTH_RANGE:
++ params[0] = ctx->Const.MinLineWidth;
++ params[1] = ctx->Const.MaxLineWidth;
++ break;
++ case GL_LIST_BASE:
++ params[0] = (GLfloat)(ctx->List.ListBase);
++ break;
++ case GL_LIST_INDEX:
++ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
++ break;
++ case GL_LIST_MODE:
++ {
++ GLenum mode;
++ if (!ctx->CompileFlag)
++ mode = 0;
++ else if (ctx->ExecuteFlag)
++ mode = GL_COMPILE_AND_EXECUTE;
++ else
++ mode = GL_COMPILE;
++ params[0] = ENUM_TO_FLOAT(mode);
++ }
++ break;
++ case GL_INDEX_LOGIC_OP:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
++ break;
++ case GL_COLOR_LOGIC_OP:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
++ break;
++ case GL_LOGIC_OP_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
++ break;
++ case GL_MAP1_COLOR_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
++ break;
++ case GL_MAP1_GRID_DOMAIN:
++ params[0] = ctx->Eval.MapGrid1u1;
++ params[1] = ctx->Eval.MapGrid1u2;
++ break;
++ case GL_MAP1_GRID_SEGMENTS:
++ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
++ break;
++ case GL_MAP1_INDEX:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
++ break;
++ case GL_MAP1_NORMAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
++ break;
++ case GL_MAP1_TEXTURE_COORD_1:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
++ break;
++ case GL_MAP1_TEXTURE_COORD_2:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
++ break;
++ case GL_MAP1_TEXTURE_COORD_3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
++ break;
++ case GL_MAP1_TEXTURE_COORD_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
++ break;
++ case GL_MAP1_VERTEX_3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
++ break;
++ case GL_MAP1_VERTEX_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
++ break;
++ case GL_MAP2_COLOR_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
++ break;
++ case GL_MAP2_GRID_DOMAIN:
++ params[0] = ctx->Eval.MapGrid2u1;
++ params[1] = ctx->Eval.MapGrid2u2;
++ params[2] = ctx->Eval.MapGrid2v1;
++ params[3] = ctx->Eval.MapGrid2v2;
++ break;
++ case GL_MAP2_GRID_SEGMENTS:
++ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
++ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
++ break;
++ case GL_MAP2_INDEX:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
++ break;
++ case GL_MAP2_NORMAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
++ break;
++ case GL_MAP2_TEXTURE_COORD_1:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
++ break;
++ case GL_MAP2_TEXTURE_COORD_2:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
++ break;
++ case GL_MAP2_TEXTURE_COORD_3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
++ break;
++ case GL_MAP2_TEXTURE_COORD_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
++ break;
++ case GL_MAP2_VERTEX_3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
++ break;
++ case GL_MAP2_VERTEX_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
++ break;
++ case GL_MAP_COLOR:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
++ break;
++ case GL_MAP_STENCIL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
++ break;
++ case GL_MATRIX_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
++ break;
++ case GL_MAX_ATTRIB_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
++ break;
++ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
++ break;
++ case GL_MAX_CLIP_PLANES:
++ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
++ break;
++ case GL_MAX_ELEMENTS_VERTICES:
++ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
++ break;
++ case GL_MAX_ELEMENTS_INDICES:
++ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
++ break;
++ case GL_MAX_EVAL_ORDER:
++ params[0] = (GLfloat)(MAX_EVAL_ORDER);
++ break;
++ case GL_MAX_LIGHTS:
++ params[0] = (GLfloat)(ctx->Const.MaxLights);
++ break;
++ case GL_MAX_LIST_NESTING:
++ params[0] = (GLfloat)(MAX_LIST_NESTING);
++ break;
++ case GL_MAX_MODELVIEW_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
++ break;
++ case GL_MAX_NAME_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
++ break;
++ case GL_MAX_PIXEL_MAP_TABLE:
++ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
++ break;
++ case GL_MAX_PROJECTION_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
++ break;
++ case GL_MAX_TEXTURE_SIZE:
++ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
++ break;
++ case GL_MAX_3D_TEXTURE_SIZE:
++ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
++ break;
++ case GL_MAX_TEXTURE_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
++ break;
++ case GL_MAX_VIEWPORT_DIMS:
++ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
++ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
++ break;
++ case GL_MODELVIEW_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_MODELVIEW_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
++ break;
++ case GL_NAME_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
++ break;
++ case GL_NORMALIZE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
++ break;
++ case GL_PACK_ALIGNMENT:
++ params[0] = (GLfloat)(ctx->Pack.Alignment);
++ break;
++ case GL_PACK_LSB_FIRST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
++ break;
++ case GL_PACK_ROW_LENGTH:
++ params[0] = (GLfloat)(ctx->Pack.RowLength);
++ break;
++ case GL_PACK_SKIP_PIXELS:
++ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
++ break;
++ case GL_PACK_SKIP_ROWS:
++ params[0] = (GLfloat)(ctx->Pack.SkipRows);
++ break;
++ case GL_PACK_SWAP_BYTES:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
++ break;
++ case GL_PACK_SKIP_IMAGES_EXT:
++ params[0] = (GLfloat)(ctx->Pack.SkipImages);
++ break;
++ case GL_PACK_IMAGE_HEIGHT_EXT:
++ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
++ break;
++ case GL_PACK_INVERT_MESA:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
++ break;
++ case GL_PERSPECTIVE_CORRECTION_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
++ break;
++ case GL_PIXEL_MAP_A_TO_A_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
++ break;
++ case GL_PIXEL_MAP_B_TO_B_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
++ break;
++ case GL_PIXEL_MAP_G_TO_G_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_A_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_B_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_G_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_I_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_R_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
++ break;
++ case GL_PIXEL_MAP_R_TO_R_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
++ break;
++ case GL_PIXEL_MAP_S_TO_S_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
++ break;
++ case GL_POINT_SIZE:
++ params[0] = ctx->Point.Size;
++ break;
++ case GL_POINT_SIZE_GRANULARITY:
++ params[0] = ctx->Const.PointSizeGranularity;
++ break;
++ case GL_POINT_SIZE_RANGE:
++ params[0] = ctx->Const.MinPointSizeAA;
++ params[1] = ctx->Const.MaxPointSizeAA;
++ break;
++ case GL_ALIASED_POINT_SIZE_RANGE:
++ params[0] = ctx->Const.MinPointSize;
++ params[1] = ctx->Const.MaxPointSize;
++ break;
++ case GL_POINT_SMOOTH:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
++ break;
++ case GL_POINT_SMOOTH_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
++ break;
++ case GL_POINT_SIZE_MIN_EXT:
++ params[0] = ctx->Point.MinSize;
++ break;
++ case GL_POINT_SIZE_MAX_EXT:
++ params[0] = ctx->Point.MaxSize;
++ break;
++ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
++ params[0] = ctx->Point.Threshold;
++ break;
++ case GL_DISTANCE_ATTENUATION_EXT:
++ params[0] = ctx->Point.Params[0];
++ params[1] = ctx->Point.Params[1];
++ params[2] = ctx->Point.Params[2];
++ break;
++ case GL_POLYGON_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
++ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
++ break;
++ case GL_POLYGON_OFFSET_BIAS_EXT:
++ params[0] = ctx->Polygon.OffsetUnits;
++ break;
++ case GL_POLYGON_OFFSET_FACTOR:
++ params[0] = ctx->Polygon.OffsetFactor ;
++ break;
++ case GL_POLYGON_OFFSET_UNITS:
++ params[0] = ctx->Polygon.OffsetUnits ;
++ break;
++ case GL_POLYGON_SMOOTH:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
++ break;
++ case GL_POLYGON_SMOOTH_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
++ break;
++ case GL_POLYGON_STIPPLE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
++ break;
++ case GL_PROJECTION_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_PROJECTION_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
++ break;
++ case GL_READ_BUFFER:
++ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
++ break;
++ case GL_RED_BIAS:
++ params[0] = ctx->Pixel.RedBias;
++ break;
++ case GL_RED_BITS:
++ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
++ break;
++ case GL_RED_SCALE:
++ params[0] = ctx->Pixel.RedScale;
++ break;
++ case GL_RENDER_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
++ break;
++ case GL_RESCALE_NORMAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
++ break;
++ case GL_RGBA_MODE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
++ break;
++ case GL_SCISSOR_BOX:
++ params[0] = (GLfloat)(ctx->Scissor.X);
++ params[1] = (GLfloat)(ctx->Scissor.Y);
++ params[2] = (GLfloat)(ctx->Scissor.Width);
++ params[3] = (GLfloat)(ctx->Scissor.Height);
++ break;
++ case GL_SCISSOR_TEST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
++ break;
++ case GL_SELECTION_BUFFER_SIZE:
++ params[0] = (GLfloat)(ctx->Select.BufferSize);
++ break;
++ case GL_SHADE_MODEL:
++ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
++ break;
++ case GL_SHARED_TEXTURE_PALETTE_EXT:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
++ break;
++ case GL_STENCIL_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
++ break;
++ case GL_STENCIL_CLEAR_VALUE:
++ params[0] = (GLfloat)(ctx->Stencil.Clear);
++ break;
++ case GL_STENCIL_FAIL:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_FUNC:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_REF:
++ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_TEST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
++ break;
++ case GL_STENCIL_VALUE_MASK:
++ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_WRITEMASK:
++ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STEREO:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
++ break;
++ case GL_SUBPIXEL_BITS:
++ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
++ break;
++ case GL_TEXTURE_1D:
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
++ break;
++ case GL_TEXTURE_2D:
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
++ break;
++ case GL_TEXTURE_3D:
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
++ break;
++ case GL_TEXTURE_BINDING_1D:
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
++ break;
++ case GL_TEXTURE_BINDING_2D:
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
++ break;
++ case GL_TEXTURE_BINDING_3D:
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
++ break;
++ case GL_TEXTURE_ENV_COLOR:
++ {
++ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
++ params[0] = color[0];
++ params[1] = color[1];
++ params[2] = color[2];
++ params[3] = color[3];
++ }
++ break;
++ case GL_TEXTURE_ENV_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
++ break;
++ case GL_TEXTURE_GEN_S:
++ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_T:
++ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_R:
++ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_Q:
++ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_MATRIX:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TEXTURE_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
++ break;
++ case GL_UNPACK_ALIGNMENT:
++ params[0] = (GLfloat)(ctx->Unpack.Alignment);
++ break;
++ case GL_UNPACK_LSB_FIRST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
++ break;
++ case GL_UNPACK_ROW_LENGTH:
++ params[0] = (GLfloat)(ctx->Unpack.RowLength);
++ break;
++ case GL_UNPACK_SKIP_PIXELS:
++ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
++ break;
++ case GL_UNPACK_SKIP_ROWS:
++ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
++ break;
++ case GL_UNPACK_SWAP_BYTES:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
++ break;
++ case GL_UNPACK_SKIP_IMAGES_EXT:
++ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
++ break;
++ case GL_UNPACK_IMAGE_HEIGHT_EXT:
++ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
++ break;
++ case GL_UNPACK_CLIENT_STORAGE_APPLE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
++ break;
++ case GL_VIEWPORT:
++ params[0] = (GLfloat)(ctx->Viewport.X);
++ params[1] = (GLfloat)(ctx->Viewport.Y);
++ params[2] = (GLfloat)(ctx->Viewport.Width);
++ params[3] = (GLfloat)(ctx->Viewport.Height);
++ break;
++ case GL_ZOOM_X:
++ params[0] = ctx->Pixel.ZoomX;
++ break;
++ case GL_ZOOM_Y:
++ params[0] = ctx->Pixel.ZoomY;
++ break;
++ case GL_VERTEX_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
++ break;
++ case GL_VERTEX_ARRAY_SIZE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
++ break;
++ case GL_VERTEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
++ break;
++ case GL_VERTEX_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
++ break;
++ case GL_VERTEX_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_NORMAL_ARRAY:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
++ break;
++ case GL_NORMAL_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
++ break;
++ case GL_NORMAL_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
++ break;
++ case GL_NORMAL_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_COLOR_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
++ break;
++ case GL_COLOR_ARRAY_SIZE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
++ break;
++ case GL_COLOR_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
++ break;
++ case GL_COLOR_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
++ break;
++ case GL_COLOR_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_INDEX_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
++ break;
++ case GL_INDEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
++ break;
++ case GL_INDEX_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
++ break;
++ case GL_INDEX_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_TEXTURE_COORD_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_SIZE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_EDGE_FLAG_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
++ break;
++ case GL_EDGE_FLAG_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
++ break;
++ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_MAX_TEXTURE_UNITS_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
++ break;
++ case GL_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetFloatv");
++ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
++ break;
++ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetFloatv");
++ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
++ break;
++ case GL_TEXTURE_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
++ break;
++ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
++ break;
++ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
++ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
++ break;
++ case GL_TEXTURE_COMPRESSION_HINT_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
++ break;
++ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
++ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
++ break;
++ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
++ {
++ GLint formats[100];
++ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
++ ASSERT(n <= 100);
++ for (i = 0; i < n; i++)
++ params[i] = ENUM_TO_INT(formats[i]);
++ }
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.LockFirst);
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.LockCount);
++ break;
++ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_COLOR_MATRIX_SGI:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
++ break;
++ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
++ break;
++ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixScale[0];
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixScale[1];
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixScale[2];
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixScale[3];
++ break;
++ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixBias[0];
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixBias[1];
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixBias[2];
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixBias[3];
++ break;
++ case GL_CONVOLUTION_1D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
++ break;
++ case GL_CONVOLUTION_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
++ break;
++ case GL_SEPARABLE_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
++ break;
++ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionScale[0];
++ break;
++ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionScale[1];
++ break;
++ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionScale[2];
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionScale[3];
++ break;
++ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionBias[0];
++ break;
++ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionBias[1];
++ break;
++ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionBias[2];
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionBias[3];
++ break;
++ case GL_HISTOGRAM:
++ CHECK_EXT1(EXT_histogram, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
++ break;
++ case GL_MINMAX:
++ CHECK_EXT1(EXT_histogram, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
++ break;
++ case GL_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
++ break;
++ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
++ break;
++ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
++ break;
++ case GL_TEXTURE_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
++ break;
++ case GL_COLOR_SUM_EXT:
++ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
++ break;
++ case GL_CURRENT_SECONDARY_COLOR_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
++ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
++ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
++ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
++ }
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
++ break;
++ case GL_CURRENT_FOG_COORDINATE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
++ }
++ break;
++ case GL_FOG_COORDINATE_ARRAY_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
++ break;
++ case GL_FOG_COORDINATE_SOURCE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
++ break;
++ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
++ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
++ params[0] = ctx->Const.MaxTextureLodBias;
++ break;
++ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
++ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
++ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
++ break;
++ case GL_MULTISAMPLE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
++ break;
++ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
++ break;
++ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
++ break;
++ case GL_SAMPLE_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
++ break;
++ case GL_SAMPLE_COVERAGE_VALUE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = ctx->Multisample.SampleCoverageValue;
++ break;
++ case GL_SAMPLE_COVERAGE_INVERT_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
++ break;
++ case GL_SAMPLE_BUFFERS_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
++ break;
++ case GL_SAMPLES_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
++ break;
++ case GL_RASTER_POSITION_UNCLIPPED_IBM:
++ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
++ break;
++ case GL_POINT_SPRITE_NV:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
++ break;
++ case GL_POINT_SPRITE_R_MODE_NV:
++ CHECK_EXT1(NV_point_sprite, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
++ break;
++ case GL_POINT_SPRITE_COORD_ORIGIN:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
++ break;
++ case GL_GENERATE_MIPMAP_HINT_SGIS:
++ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
++ break;
++ case GL_VERTEX_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY0_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY1_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY2_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY3_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY5_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY6_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY7_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY8_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY9_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY10_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY11_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY12_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY13_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY14_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY15_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
++ break;
++ case GL_FRAGMENT_PROGRAM_NV:
++ CHECK_EXT1(NV_fragment_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
++ break;
++ case GL_FRAGMENT_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
++ break;
++ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
++ CHECK_EXT1(NV_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
++ break;
++ case GL_TEXTURE_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
++ break;
++ case GL_TEXTURE_BINDING_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
++ break;
++ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
++ break;
++ case GL_STENCIL_TEST_TWO_SIDE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
++ break;
++ case GL_ACTIVE_STENCIL_FACE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
++ break;
++ case GL_MAX_SHININESS_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
++ params[0] = ctx->Const.MaxShininess;
++ break;
++ case GL_MAX_SPOT_EXPONENT_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
++ params[0] = ctx->Const.MaxSpotExponent;
++ break;
++ case GL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
++ break;
++ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
++ break;
++ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
++ break;
++ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
++ break;
++ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
++ break;
++ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
++ break;
++ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
++ break;
++ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
++ break;
++ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
++ break;
++ case GL_VERTEX_PROGRAM_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
++ break;
++ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
++ break;
++ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
++ break;
++ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
++ break;
++ case GL_MAX_PROGRAM_MATRICES_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
++ break;
++ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
++ break;
++ case GL_CURRENT_MATRIX_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
++ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_MAX_VERTEX_ATTRIBS_ARB:
++ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
++ break;
++ case GL_PROGRAM_ERROR_POSITION_ARB:
++ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Program.ErrorPos);
++ break;
++ case GL_FRAGMENT_PROGRAM_ARB:
++ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
++ break;
++ case GL_MAX_TEXTURE_COORDS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
++ break;
++ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
++ break;
++ case GL_DEPTH_BOUNDS_TEST_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
++ break;
++ case GL_DEPTH_BOUNDS_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
++ params[0] = ctx->Depth.BoundsMin;
++ params[1] = ctx->Depth.BoundsMax;
++ break;
++ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
++ break;
++ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
++ break;
++ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetFloatv");
++ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
++ break;
++ case GL_VERTEX_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetFloatv");
++ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
++ break;
++ case GL_MAX_DRAW_BUFFERS_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
++ break;
++ case GL_DRAW_BUFFER0_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_DRAW_BUFFER1_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
++ params[0] = ENUM_TO_FLOAT(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER2_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
++ params[0] = ENUM_TO_FLOAT(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER3_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
++ params[0] = ENUM_TO_FLOAT(buffer);
++ }
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
++ CHECK_EXT1(OES_read_format, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.ColorReadType);
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
++ CHECK_EXT1(OES_read_format, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
++ break;
++ case GL_NUM_FRAGMENT_REGISTERS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(6);
++ break;
++ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(8);
++ break;
++ case GL_NUM_PASSES_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(2);
++ break;
++ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(8);
++ break;
++ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(16);
++ break;
++ case GL_COLOR_ALPHA_PAIRING_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
++ break;
++ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(3);
++ break;
++ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(3);
++ break;
++ case GL_STENCIL_BACK_FUNC:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
++ break;
++ case GL_STENCIL_BACK_VALUE_MASK:
++ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
++ break;
++ case GL_STENCIL_BACK_REF:
++ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
++ break;
++ case GL_STENCIL_BACK_FAIL:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
++ break;
++ case GL_FRAMEBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
++ break;
++ case GL_RENDERBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
++ break;
++ case GL_MAX_COLOR_ATTACHMENTS_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
++ break;
++ case GL_MAX_RENDERBUFFER_SIZE_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
++ break;
++ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
++ break;
++ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
++ break;
++ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
++ break;
++ case GL_MAX_VARYING_FLOATS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
++ break;
++ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
++ break;
++ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
++ break;
++ default:
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
++ }
++}
++
++void GLAPIENTRY
++_mesa_GetIntegerv( GLenum pname, GLint *params )
++{
++ GET_CURRENT_CONTEXT(ctx);
++ ASSERT_OUTSIDE_BEGIN_END(ctx);
++
++ if (!params)
++ return;
++
++ if (ctx->NewState)
++ _mesa_update_state(ctx);
++
++ if (ctx->Driver.GetIntegerv &&
++ ctx->Driver.GetIntegerv(ctx, pname, params))
++ return;
++
++ switch (pname) {
++ case GL_ACCUM_RED_BITS:
++ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
++ break;
++ case GL_ACCUM_GREEN_BITS:
++ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
++ break;
++ case GL_ACCUM_BLUE_BITS:
++ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
++ break;
++ case GL_ACCUM_ALPHA_BITS:
++ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
++ break;
++ case GL_ACCUM_CLEAR_VALUE:
++ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
++ break;
++ case GL_ALPHA_BIAS:
++ params[0] = IROUND(ctx->Pixel.AlphaBias);
++ break;
++ case GL_ALPHA_BITS:
++ params[0] = ctx->DrawBuffer->Visual.alphaBits;
++ break;
++ case GL_ALPHA_SCALE:
++ params[0] = IROUND(ctx->Pixel.AlphaScale);
++ break;
++ case GL_ALPHA_TEST:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
++ break;
++ case GL_ALPHA_TEST_FUNC:
++ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
++ break;
++ case GL_ALPHA_TEST_REF:
++ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
++ break;
++ case GL_ATTRIB_STACK_DEPTH:
++ params[0] = ctx->AttribStackDepth;
++ break;
++ case GL_AUTO_NORMAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
++ break;
++ case GL_AUX_BUFFERS:
++ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
++ break;
++ case GL_BLEND:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
++ break;
++ case GL_BLEND_DST:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_SRC_RGB_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_DST_RGB_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC_ALPHA_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
++ break;
++ case GL_BLEND_DST_ALPHA_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
++ break;
++ case GL_BLEND_EQUATION:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
++ break;
++ case GL_BLEND_EQUATION_ALPHA_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
++ break;
++ case GL_BLEND_COLOR_EXT:
++ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
++ break;
++ case GL_BLUE_BIAS:
++ params[0] = IROUND(ctx->Pixel.BlueBias);
++ break;
++ case GL_BLUE_BITS:
++ params[0] = ctx->DrawBuffer->Visual.blueBits;
++ break;
++ case GL_BLUE_SCALE:
++ params[0] = IROUND(ctx->Pixel.BlueScale);
++ break;
++ case GL_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = ctx->ClientAttribStackDepth;
++ break;
++ case GL_CLIP_PLANE0:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
++ break;
++ case GL_CLIP_PLANE1:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
++ break;
++ case GL_CLIP_PLANE2:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
++ break;
++ case GL_CLIP_PLANE3:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
++ break;
++ case GL_CLIP_PLANE4:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
++ break;
++ case GL_CLIP_PLANE5:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
++ break;
++ case GL_COLOR_CLEAR_VALUE:
++ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
++ break;
++ case GL_COLOR_MATERIAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
++ break;
++ case GL_COLOR_MATERIAL_FACE:
++ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
++ break;
++ case GL_COLOR_MATERIAL_PARAMETER:
++ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
++ break;
++ case GL_COLOR_WRITEMASK:
++ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
++ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
++ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
++ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
++ break;
++ case GL_CULL_FACE:
++ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
++ break;
++ case GL_CULL_FACE_MODE:
++ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
++ break;
++ case GL_CURRENT_COLOR:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
++ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
++ }
++ break;
++ case GL_CURRENT_INDEX:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
++ }
++ break;
++ case GL_CURRENT_NORMAL:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
++ }
++ break;
++ case GL_CURRENT_RASTER_COLOR:
++ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
++ break;
++ case GL_CURRENT_RASTER_DISTANCE:
++ params[0] = IROUND(ctx->Current.RasterDistance);
++ break;
++ case GL_CURRENT_RASTER_INDEX:
++ params[0] = IROUND(ctx->Current.RasterIndex);
++ break;
++ case GL_CURRENT_RASTER_POSITION:
++ params[0] = IROUND(ctx->Current.RasterPos[0]);
++ params[1] = IROUND(ctx->Current.RasterPos[1]);
++ params[2] = IROUND(ctx->Current.RasterPos[2]);
++ params[3] = IROUND(ctx->Current.RasterPos[3]);
++ break;
++ case GL_CURRENT_RASTER_SECONDARY_COLOR:
++ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
++ break;
++ case GL_CURRENT_RASTER_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
++ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
++ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
++ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
++ }
++ break;
++ case GL_CURRENT_RASTER_POSITION_VALID:
++ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
++ break;
++ case GL_CURRENT_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
++ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
++ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
++ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
++ }
++ break;
++ case GL_DEPTH_BIAS:
++ params[0] = IROUND(ctx->Pixel.DepthBias);
++ break;
++ case GL_DEPTH_BITS:
++ params[0] = ctx->DrawBuffer->Visual.depthBits;
++ break;
++ case GL_DEPTH_CLEAR_VALUE:
++ params[0] = IROUND(ctx->Depth.Clear);
++ break;
++ case GL_DEPTH_FUNC:
++ params[0] = ENUM_TO_INT(ctx->Depth.Func);
++ break;
++ case GL_DEPTH_RANGE:
++ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
++ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
++ break;
++ case GL_DEPTH_SCALE:
++ params[0] = IROUND(ctx->Pixel.DepthScale);
++ break;
++ case GL_DEPTH_TEST:
++ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
++ break;
++ case GL_DEPTH_WRITEMASK:
++ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
++ break;
++ case GL_DITHER:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
++ break;
++ case GL_DOUBLEBUFFER:
++ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
++ break;
++ case GL_DRAW_BUFFER:
++ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_EDGE_FLAG:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
++ }
++ break;
++ case GL_FEEDBACK_BUFFER_SIZE:
++ params[0] = ctx->Feedback.BufferSize;
++ break;
++ case GL_FEEDBACK_BUFFER_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
++ break;
++ case GL_FOG:
++ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
++ break;
++ case GL_FOG_COLOR:
++ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
++ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
++ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
++ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
++ break;
++ case GL_FOG_DENSITY:
++ params[0] = IROUND(ctx->Fog.Density);
++ break;
++ case GL_FOG_END:
++ params[0] = IROUND(ctx->Fog.End);
++ break;
++ case GL_FOG_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
++ break;
++ case GL_FOG_INDEX:
++ params[0] = IROUND(ctx->Fog.Index);
++ break;
++ case GL_FOG_MODE:
++ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
++ break;
++ case GL_FOG_START:
++ params[0] = IROUND(ctx->Fog.Start);
++ break;
++ case GL_FRONT_FACE:
++ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
++ break;
++ case GL_GREEN_BIAS:
++ params[0] = IROUND(ctx->Pixel.GreenBias);
++ break;
++ case GL_GREEN_BITS:
++ params[0] = ctx->DrawBuffer->Visual.greenBits;
++ break;
++ case GL_GREEN_SCALE:
++ params[0] = IROUND(ctx->Pixel.GreenScale);
++ break;
++ case GL_INDEX_BITS:
++ params[0] = ctx->DrawBuffer->Visual.indexBits;
++ break;
++ case GL_INDEX_CLEAR_VALUE:
++ params[0] = ctx->Color.ClearIndex;
++ break;
++ case GL_INDEX_MODE:
++ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
++ break;
++ case GL_INDEX_OFFSET:
++ params[0] = ctx->Pixel.IndexOffset;
++ break;
++ case GL_INDEX_SHIFT:
++ params[0] = ctx->Pixel.IndexShift;
++ break;
++ case GL_INDEX_WRITEMASK:
++ params[0] = ctx->Color.IndexMask;
++ break;
++ case GL_LIGHT0:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
++ break;
++ case GL_LIGHT1:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
++ break;
++ case GL_LIGHT2:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
++ break;
++ case GL_LIGHT3:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
++ break;
++ case GL_LIGHT4:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
++ break;
++ case GL_LIGHT5:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
++ break;
++ case GL_LIGHT6:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
++ break;
++ case GL_LIGHT7:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
++ break;
++ case GL_LIGHTING:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
++ break;
++ case GL_LIGHT_MODEL_AMBIENT:
++ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
++ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
++ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
++ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
++ break;
++ case GL_LIGHT_MODEL_COLOR_CONTROL:
++ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
++ break;
++ case GL_LIGHT_MODEL_LOCAL_VIEWER:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
++ break;
++ case GL_LIGHT_MODEL_TWO_SIDE:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
++ break;
++ case GL_LINE_SMOOTH:
++ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
++ break;
++ case GL_LINE_SMOOTH_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
++ break;
++ case GL_LINE_STIPPLE:
++ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
++ break;
++ case GL_LINE_STIPPLE_PATTERN:
++ params[0] = ctx->Line.StipplePattern;
++ break;
++ case GL_LINE_STIPPLE_REPEAT:
++ params[0] = ctx->Line.StippleFactor;
++ break;
++ case GL_LINE_WIDTH:
++ params[0] = IROUND(ctx->Line.Width);
++ break;
++ case GL_LINE_WIDTH_GRANULARITY:
++ params[0] = IROUND(ctx->Const.LineWidthGranularity);
++ break;
++ case GL_LINE_WIDTH_RANGE:
++ params[0] = IROUND(ctx->Const.MinLineWidthAA);
++ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
++ break;
++ case GL_ALIASED_LINE_WIDTH_RANGE:
++ params[0] = IROUND(ctx->Const.MinLineWidth);
++ params[1] = IROUND(ctx->Const.MaxLineWidth);
++ break;
++ case GL_LIST_BASE:
++ params[0] = ctx->List.ListBase;
++ break;
++ case GL_LIST_INDEX:
++ params[0] = ctx->ListState.CurrentListNum;
++ break;
++ case GL_LIST_MODE:
++ {
++ GLenum mode;
++ if (!ctx->CompileFlag)
++ mode = 0;
++ else if (ctx->ExecuteFlag)
++ mode = GL_COMPILE_AND_EXECUTE;
++ else
++ mode = GL_COMPILE;
++ params[0] = ENUM_TO_INT(mode);
++ }
++ break;
++ case GL_INDEX_LOGIC_OP:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
++ break;
++ case GL_COLOR_LOGIC_OP:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
++ break;
++ case GL_LOGIC_OP_MODE:
++ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
++ break;
++ case GL_MAP1_COLOR_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
++ break;
++ case GL_MAP1_GRID_DOMAIN:
++ params[0] = IROUND(ctx->Eval.MapGrid1u1);
++ params[1] = IROUND(ctx->Eval.MapGrid1u2);
++ break;
++ case GL_MAP1_GRID_SEGMENTS:
++ params[0] = ctx->Eval.MapGrid1un;
++ break;
++ case GL_MAP1_INDEX:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
++ break;
++ case GL_MAP1_NORMAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
++ break;
++ case GL_MAP1_TEXTURE_COORD_1:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
++ break;
++ case GL_MAP1_TEXTURE_COORD_2:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
++ break;
++ case GL_MAP1_TEXTURE_COORD_3:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
++ break;
++ case GL_MAP1_TEXTURE_COORD_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
++ break;
++ case GL_MAP1_VERTEX_3:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
++ break;
++ case GL_MAP1_VERTEX_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
++ break;
++ case GL_MAP2_COLOR_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
++ break;
++ case GL_MAP2_GRID_DOMAIN:
++ params[0] = IROUND(ctx->Eval.MapGrid2u1);
++ params[1] = IROUND(ctx->Eval.MapGrid2u2);
++ params[2] = IROUND(ctx->Eval.MapGrid2v1);
++ params[3] = IROUND(ctx->Eval.MapGrid2v2);
++ break;
++ case GL_MAP2_GRID_SEGMENTS:
++ params[0] = ctx->Eval.MapGrid2un;
++ params[1] = ctx->Eval.MapGrid2vn;
++ break;
++ case GL_MAP2_INDEX:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
++ break;
++ case GL_MAP2_NORMAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
++ break;
++ case GL_MAP2_TEXTURE_COORD_1:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
++ break;
++ case GL_MAP2_TEXTURE_COORD_2:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
++ break;
++ case GL_MAP2_TEXTURE_COORD_3:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
++ break;
++ case GL_MAP2_TEXTURE_COORD_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
++ break;
++ case GL_MAP2_VERTEX_3:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
++ break;
++ case GL_MAP2_VERTEX_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
++ break;
++ case GL_MAP_COLOR:
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
++ break;
++ case GL_MAP_STENCIL:
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
++ break;
++ case GL_MATRIX_MODE:
++ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
++ break;
++ case GL_MAX_ATTRIB_STACK_DEPTH:
++ params[0] = MAX_ATTRIB_STACK_DEPTH;
++ break;
++ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
++ break;
++ case GL_MAX_CLIP_PLANES:
++ params[0] = ctx->Const.MaxClipPlanes;
++ break;
++ case GL_MAX_ELEMENTS_VERTICES:
++ params[0] = ctx->Const.MaxArrayLockSize;
++ break;
++ case GL_MAX_ELEMENTS_INDICES:
++ params[0] = ctx->Const.MaxArrayLockSize;
++ break;
++ case GL_MAX_EVAL_ORDER:
++ params[0] = MAX_EVAL_ORDER;
++ break;
++ case GL_MAX_LIGHTS:
++ params[0] = ctx->Const.MaxLights;
++ break;
++ case GL_MAX_LIST_NESTING:
++ params[0] = MAX_LIST_NESTING;
++ break;
++ case GL_MAX_MODELVIEW_STACK_DEPTH:
++ params[0] = MAX_MODELVIEW_STACK_DEPTH;
++ break;
++ case GL_MAX_NAME_STACK_DEPTH:
++ params[0] = MAX_NAME_STACK_DEPTH;
++ break;
++ case GL_MAX_PIXEL_MAP_TABLE:
++ params[0] = MAX_PIXEL_MAP_TABLE;
++ break;
++ case GL_MAX_PROJECTION_STACK_DEPTH:
++ params[0] = MAX_PROJECTION_STACK_DEPTH;
++ break;
++ case GL_MAX_TEXTURE_SIZE:
++ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
++ break;
++ case GL_MAX_3D_TEXTURE_SIZE:
++ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
++ break;
++ case GL_MAX_TEXTURE_STACK_DEPTH:
++ params[0] = MAX_TEXTURE_STACK_DEPTH;
++ break;
++ case GL_MAX_VIEWPORT_DIMS:
++ params[0] = ctx->Const.MaxViewportWidth;
++ params[1] = ctx->Const.MaxViewportHeight;
++ break;
++ case GL_MODELVIEW_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_MODELVIEW_STACK_DEPTH:
++ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
++ break;
++ case GL_NAME_STACK_DEPTH:
++ params[0] = ctx->Select.NameStackDepth;
++ break;
++ case GL_NORMALIZE:
++ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
++ break;
++ case GL_PACK_ALIGNMENT:
++ params[0] = ctx->Pack.Alignment;
++ break;
++ case GL_PACK_LSB_FIRST:
++ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
++ break;
++ case GL_PACK_ROW_LENGTH:
++ params[0] = ctx->Pack.RowLength;
++ break;
++ case GL_PACK_SKIP_PIXELS:
++ params[0] = ctx->Pack.SkipPixels;
++ break;
++ case GL_PACK_SKIP_ROWS:
++ params[0] = ctx->Pack.SkipRows;
++ break;
++ case GL_PACK_SWAP_BYTES:
++ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
++ break;
++ case GL_PACK_SKIP_IMAGES_EXT:
++ params[0] = ctx->Pack.SkipImages;
++ break;
++ case GL_PACK_IMAGE_HEIGHT_EXT:
++ params[0] = ctx->Pack.ImageHeight;
++ break;
++ case GL_PACK_INVERT_MESA:
++ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
++ break;
++ case GL_PERSPECTIVE_CORRECTION_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
++ break;
++ case GL_PIXEL_MAP_A_TO_A_SIZE:
++ params[0] = ctx->Pixel.MapAtoAsize;
++ break;
++ case GL_PIXEL_MAP_B_TO_B_SIZE:
++ params[0] = ctx->Pixel.MapBtoBsize;
++ break;
++ case GL_PIXEL_MAP_G_TO_G_SIZE:
++ params[0] = ctx->Pixel.MapGtoGsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_A_SIZE:
++ params[0] = ctx->Pixel.MapItoAsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_B_SIZE:
++ params[0] = ctx->Pixel.MapItoBsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_G_SIZE:
++ params[0] = ctx->Pixel.MapItoGsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_I_SIZE:
++ params[0] = ctx->Pixel.MapItoIsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_R_SIZE:
++ params[0] = ctx->Pixel.MapItoRsize;
++ break;
++ case GL_PIXEL_MAP_R_TO_R_SIZE:
++ params[0] = ctx->Pixel.MapRtoRsize;
++ break;
++ case GL_PIXEL_MAP_S_TO_S_SIZE:
++ params[0] = ctx->Pixel.MapStoSsize;
++ break;
++ case GL_POINT_SIZE:
++ params[0] = IROUND(ctx->Point.Size);
++ break;
++ case GL_POINT_SIZE_GRANULARITY:
++ params[0] = IROUND(ctx->Const.PointSizeGranularity);
++ break;
++ case GL_POINT_SIZE_RANGE:
++ params[0] = IROUND(ctx->Const.MinPointSizeAA);
++ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
++ break;
++ case GL_ALIASED_POINT_SIZE_RANGE:
++ params[0] = IROUND(ctx->Const.MinPointSize);
++ params[1] = IROUND(ctx->Const.MaxPointSize);
++ break;
++ case GL_POINT_SMOOTH:
++ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
++ break;
++ case GL_POINT_SMOOTH_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
++ break;
++ case GL_POINT_SIZE_MIN_EXT:
++ params[0] = IROUND(ctx->Point.MinSize);
++ break;
++ case GL_POINT_SIZE_MAX_EXT:
++ params[0] = IROUND(ctx->Point.MaxSize);
++ break;
++ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
++ params[0] = IROUND(ctx->Point.Threshold);
++ break;
++ case GL_DISTANCE_ATTENUATION_EXT:
++ params[0] = IROUND(ctx->Point.Params[0]);
++ params[1] = IROUND(ctx->Point.Params[1]);
++ params[2] = IROUND(ctx->Point.Params[2]);
++ break;
++ case GL_POLYGON_MODE:
++ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
++ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
++ break;
++ case GL_POLYGON_OFFSET_BIAS_EXT:
++ params[0] = IROUND(ctx->Polygon.OffsetUnits);
++ break;
++ case GL_POLYGON_OFFSET_FACTOR:
++ params[0] = IROUND(ctx->Polygon.OffsetFactor );
++ break;
++ case GL_POLYGON_OFFSET_UNITS:
++ params[0] = IROUND(ctx->Polygon.OffsetUnits );
++ break;
++ case GL_POLYGON_SMOOTH:
++ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
++ break;
++ case GL_POLYGON_SMOOTH_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
++ break;
++ case GL_POLYGON_STIPPLE:
++ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
++ break;
++ case GL_PROJECTION_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_PROJECTION_STACK_DEPTH:
++ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
++ break;
++ case GL_READ_BUFFER:
++ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
++ break;
++ case GL_RED_BIAS:
++ params[0] = IROUND(ctx->Pixel.RedBias);
++ break;
++ case GL_RED_BITS:
++ params[0] = ctx->DrawBuffer->Visual.redBits ;
++ break;
++ case GL_RED_SCALE:
++ params[0] = IROUND(ctx->Pixel.RedScale);
++ break;
++ case GL_RENDER_MODE:
++ params[0] = ENUM_TO_INT(ctx->RenderMode);
++ break;
++ case GL_RESCALE_NORMAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
++ break;
++ case GL_RGBA_MODE:
++ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
++ break;
++ case GL_SCISSOR_BOX:
++ params[0] = ctx->Scissor.X;
++ params[1] = ctx->Scissor.Y;
++ params[2] = ctx->Scissor.Width;
++ params[3] = ctx->Scissor.Height;
++ break;
++ case GL_SCISSOR_TEST:
++ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
++ break;
++ case GL_SELECTION_BUFFER_SIZE:
++ params[0] = ctx->Select.BufferSize;
++ break;
++ case GL_SHADE_MODEL:
++ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
++ break;
++ case GL_SHARED_TEXTURE_PALETTE_EXT:
++ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
++ break;
++ case GL_STENCIL_BITS:
++ params[0] = ctx->DrawBuffer->Visual.stencilBits;
++ break;
++ case GL_STENCIL_CLEAR_VALUE:
++ params[0] = ctx->Stencil.Clear;
++ break;
++ case GL_STENCIL_FAIL:
++ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_FUNC:
++ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_REF:
++ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
++ break;
++ case GL_STENCIL_TEST:
++ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
++ break;
++ case GL_STENCIL_VALUE_MASK:
++ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
++ break;
++ case GL_STENCIL_WRITEMASK:
++ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
++ break;
++ case GL_STEREO:
++ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
++ break;
++ case GL_SUBPIXEL_BITS:
++ params[0] = ctx->Const.SubPixelBits;
++ break;
++ case GL_TEXTURE_1D:
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
++ break;
++ case GL_TEXTURE_2D:
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
++ break;
++ case GL_TEXTURE_3D:
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
++ break;
++ case GL_TEXTURE_BINDING_1D:
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
++ break;
++ case GL_TEXTURE_BINDING_2D:
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
++ break;
++ case GL_TEXTURE_BINDING_3D:
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
++ break;
++ case GL_TEXTURE_ENV_COLOR:
++ {
++ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
++ params[0] = FLOAT_TO_INT(color[0]);
++ params[1] = FLOAT_TO_INT(color[1]);
++ params[2] = FLOAT_TO_INT(color[2]);
++ params[3] = FLOAT_TO_INT(color[3]);
++ }
++ break;
++ case GL_TEXTURE_ENV_MODE:
++ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
++ break;
++ case GL_TEXTURE_GEN_S:
++ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_T:
++ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_R:
++ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_Q:
++ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_MATRIX:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TEXTURE_STACK_DEPTH:
++ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
++ break;
++ case GL_UNPACK_ALIGNMENT:
++ params[0] = ctx->Unpack.Alignment;
++ break;
++ case GL_UNPACK_LSB_FIRST:
++ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
++ break;
++ case GL_UNPACK_ROW_LENGTH:
++ params[0] = ctx->Unpack.RowLength;
++ break;
++ case GL_UNPACK_SKIP_PIXELS:
++ params[0] = ctx->Unpack.SkipPixels;
++ break;
++ case GL_UNPACK_SKIP_ROWS:
++ params[0] = ctx->Unpack.SkipRows;
++ break;
++ case GL_UNPACK_SWAP_BYTES:
++ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
++ break;
++ case GL_UNPACK_SKIP_IMAGES_EXT:
++ params[0] = ctx->Unpack.SkipImages;
++ break;
++ case GL_UNPACK_IMAGE_HEIGHT_EXT:
++ params[0] = ctx->Unpack.ImageHeight;
++ break;
++ case GL_UNPACK_CLIENT_STORAGE_APPLE:
++ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
++ break;
++ case GL_VIEWPORT:
++ params[0] = ctx->Viewport.X;
++ params[1] = ctx->Viewport.Y;
++ params[2] = ctx->Viewport.Width;
++ params[3] = ctx->Viewport.Height;
++ break;
++ case GL_ZOOM_X:
++ params[0] = IROUND(ctx->Pixel.ZoomX);
++ break;
++ case GL_ZOOM_Y:
++ params[0] = IROUND(ctx->Pixel.ZoomY);
++ break;
++ case GL_VERTEX_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
++ break;
++ case GL_VERTEX_ARRAY_SIZE:
++ params[0] = ctx->Array.ArrayObj->Vertex.Size;
++ break;
++ case GL_VERTEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
++ break;
++ case GL_VERTEX_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
++ break;
++ case GL_VERTEX_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_NORMAL_ARRAY:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
++ break;
++ case GL_NORMAL_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
++ break;
++ case GL_NORMAL_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->Normal.Stride;
++ break;
++ case GL_NORMAL_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_COLOR_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
++ break;
++ case GL_COLOR_ARRAY_SIZE:
++ params[0] = ctx->Array.ArrayObj->Color.Size;
++ break;
++ case GL_COLOR_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
++ break;
++ case GL_COLOR_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->Color.Stride;
++ break;
++ case GL_COLOR_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_INDEX_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
++ break;
++ case GL_INDEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
++ break;
++ case GL_INDEX_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->Index.Stride;
++ break;
++ case GL_INDEX_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_TEXTURE_COORD_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_SIZE:
++ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
++ break;
++ case GL_TEXTURE_COORD_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
++ break;
++ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_EDGE_FLAG_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
++ break;
++ case GL_EDGE_FLAG_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
++ break;
++ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_MAX_TEXTURE_UNITS_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
++ params[0] = ctx->Const.MaxTextureUnits;
++ break;
++ case GL_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
++ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
++ break;
++ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
++ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
++ break;
++ case GL_TEXTURE_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
++ break;
++ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
++ break;
++ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
++ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
++ break;
++ case GL_TEXTURE_COMPRESSION_HINT_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
++ params[0] = ctx->Hint.TextureCompression;
++ break;
++ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
++ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
++ break;
++ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
++ {
++ GLint formats[100];
++ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
++ ASSERT(n <= 100);
++ for (i = 0; i < n; i++)
++ params[i] = ENUM_TO_INT(formats[i]);
++ }
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
++ params[0] = ctx->Array.LockFirst;
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
++ params[0] = ctx->Array.LockCount;
++ break;
++ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_COLOR_MATRIX_SGI:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = ctx->ColorMatrixStack.Depth + 1;
++ break;
++ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = MAX_COLOR_STACK_DEPTH;
++ break;
++ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
++ break;
++ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
++ break;
++ case GL_CONVOLUTION_1D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
++ break;
++ case GL_CONVOLUTION_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
++ break;
++ case GL_SEPARABLE_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
++ break;
++ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
++ break;
++ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
++ break;
++ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
++ break;
++ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
++ break;
++ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
++ break;
++ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
++ break;
++ case GL_HISTOGRAM:
++ CHECK_EXT1(EXT_histogram, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
++ break;
++ case GL_MINMAX:
++ CHECK_EXT1(EXT_histogram, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
++ break;
++ case GL_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
++ break;
++ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
++ break;
++ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
++ break;
++ case GL_TEXTURE_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
++ break;
++ case GL_COLOR_SUM_EXT:
++ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
++ break;
++ case GL_CURRENT_SECONDARY_COLOR_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
++ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
++ }
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
++ break;
++ case GL_CURRENT_FOG_COORDINATE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
++ }
++ break;
++ case GL_FOG_COORDINATE_ARRAY_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
++ break;
++ case GL_FOG_COORDINATE_SOURCE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
++ break;
++ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
++ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
++ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
++ break;
++ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
++ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
++ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
++ break;
++ case GL_MULTISAMPLE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
++ break;
++ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
++ break;
++ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
++ break;
++ case GL_SAMPLE_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
++ break;
++ case GL_SAMPLE_COVERAGE_VALUE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
++ break;
++ case GL_SAMPLE_COVERAGE_INVERT_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
++ break;
++ case GL_SAMPLE_BUFFERS_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
++ break;
++ case GL_SAMPLES_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = ctx->DrawBuffer->Visual.samples;
++ break;
++ case GL_RASTER_POSITION_UNCLIPPED_IBM:
++ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
++ break;
++ case GL_POINT_SPRITE_NV:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
++ break;
++ case GL_POINT_SPRITE_R_MODE_NV:
++ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
++ break;
++ case GL_POINT_SPRITE_COORD_ORIGIN:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
++ break;
++ case GL_GENERATE_MIPMAP_HINT_SGIS:
++ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
++ break;
++ case GL_VERTEX_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY0_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY1_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY2_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY3_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY5_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY6_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY7_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY8_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY9_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY10_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY11_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY12_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY13_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY14_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY15_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
++ break;
++ case GL_FRAGMENT_PROGRAM_NV:
++ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
++ break;
++ case GL_FRAGMENT_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
++ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
++ break;
++ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
++ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
++ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
++ break;
++ case GL_TEXTURE_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
++ break;
++ case GL_TEXTURE_BINDING_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
++ break;
++ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
++ params[0] = ctx->Const.MaxTextureRectSize;
++ break;
++ case GL_STENCIL_TEST_TWO_SIDE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
++ break;
++ case GL_ACTIVE_STENCIL_FACE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
++ break;
++ case GL_MAX_SHININESS_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
++ params[0] = IROUND(ctx->Const.MaxShininess);
++ break;
++ case GL_MAX_SPOT_EXPONENT_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
++ params[0] = IROUND(ctx->Const.MaxSpotExponent);
++ break;
++ case GL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayBufferObj->Name;
++ break;
++ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
++ break;
++ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
++ break;
++ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
++ break;
++ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
++ break;
++ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
++ break;
++ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
++ break;
++ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
++ break;
++ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ElementArrayBufferObj->Name;
++ break;
++ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
++ params[0] = ctx->Pack.BufferObj->Name;
++ break;
++ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
++ params[0] = ctx->Unpack.BufferObj->Name;
++ break;
++ case GL_VERTEX_PROGRAM_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
++ break;
++ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
++ break;
++ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
++ break;
++ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
++ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
++ break;
++ case GL_MAX_PROGRAM_MATRICES_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
++ params[0] = ctx->Const.MaxProgramMatrices;
++ break;
++ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
++ break;
++ case GL_CURRENT_MATRIX_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
++ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_MAX_VERTEX_ATTRIBS_ARB:
++ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
++ params[0] = ctx->Const.VertexProgram.MaxAttribs;
++ break;
++ case GL_PROGRAM_ERROR_POSITION_ARB:
++ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
++ params[0] = ctx->Program.ErrorPos;
++ break;
++ case GL_FRAGMENT_PROGRAM_ARB:
++ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
++ break;
++ case GL_MAX_TEXTURE_COORDS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
++ params[0] = ctx->Const.MaxTextureCoordUnits;
++ break;
++ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
++ params[0] = ctx->Const.MaxTextureImageUnits;
++ break;
++ case GL_DEPTH_BOUNDS_TEST_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
++ break;
++ case GL_DEPTH_BOUNDS_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
++ params[0] = IROUND(ctx->Depth.BoundsMin);
++ params[1] = IROUND(ctx->Depth.BoundsMax);
++ break;
++ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
++ break;
++ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
++ break;
++ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
++ params[0] = ctx->FragmentProgram.CurrentPosition;
++ break;
++ case GL_VERTEX_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
++ params[0] = ctx->VertexProgram.CurrentPosition;
++ break;
++ case GL_MAX_DRAW_BUFFERS_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ params[0] = ctx->Const.MaxDrawBuffers;
++ break;
++ case GL_DRAW_BUFFER0_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_DRAW_BUFFER1_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
++ params[0] = ENUM_TO_INT(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER2_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
++ params[0] = ENUM_TO_INT(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER3_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
++ params[0] = ENUM_TO_INT(buffer);
++ }
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
++ CHECK_EXT1(OES_read_format, "GetIntegerv");
++ params[0] = ctx->Const.ColorReadType;
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
++ CHECK_EXT1(OES_read_format, "GetIntegerv");
++ params[0] = ctx->Const.ColorReadFormat;
++ break;
++ case GL_NUM_FRAGMENT_REGISTERS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 6;
++ break;
++ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 8;
++ break;
++ case GL_NUM_PASSES_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 2;
++ break;
++ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 8;
++ break;
++ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 16;
++ break;
++ case GL_COLOR_ALPHA_PAIRING_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(GL_TRUE);
++ break;
++ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 3;
++ break;
++ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 3;
++ break;
++ case GL_STENCIL_BACK_FUNC:
++ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
++ break;
++ case GL_STENCIL_BACK_VALUE_MASK:
++ params[0] = ctx->Stencil.ValueMask[1];
++ break;
++ case GL_STENCIL_BACK_REF:
++ params[0] = ctx->Stencil.Ref[1];
++ break;
++ case GL_STENCIL_BACK_FAIL:
++ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
++ break;
++ case GL_FRAMEBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
++ params[0] = ctx->DrawBuffer->Name;
++ break;
++ case GL_RENDERBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
++ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
++ break;
++ case GL_MAX_COLOR_ATTACHMENTS_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
++ params[0] = ctx->Const.MaxColorAttachments;
++ break;
++ case GL_MAX_RENDERBUFFER_SIZE_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
++ params[0] = ctx->Const.MaxRenderbufferSize;
++ break;
++ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
++ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
++ break;
++ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
++ break;
++ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
++ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
++ break;
++ case GL_MAX_VARYING_FLOATS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
++ params[0] = MAX_VARYING_FLOATS;
++ break;
++ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
++ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
++ break;
++ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
++ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
++ break;
++ default:
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
++ }
++}
++
++
++void GLAPIENTRY
++_mesa_GetDoublev( GLenum pname, GLdouble *params )
++{
++ const GLfloat magic = -1234.5F;
++ GLfloat values[16];
++ GLuint i;
++
++ if (!params)
++ return;
++
++ /* Init temp array to magic numbers so we can figure out how many values
++ * are returned by the GetFloatv() call.
++ */
++ for (i = 0; i < 16; i++)
++ values[i] = magic;
++
++ _mesa_GetFloatv(pname, values);
++
++ for (i = 0; i < 16 && values[i] != magic; i++)
++ params[i] = (GLdouble) values[i];
++}
++
+Index: trunk/target-i386/mesa_gl.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/mesa_gl.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,2251 @@
++/*
++ * Mesa 3-D graphics library
++ * Version: 6.5.1
++ *
++ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included
++ * in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++
++#ifndef __gl_h_
++#define __gl_h_
++
++#if defined(USE_MGL_NAMESPACE)
++#include "gl_mangle.h"
++#endif
++
++
++/**********************************************************************
++ * Begin system-specific stuff. Do not do any of this when building
++ * for SciTech SNAP, as this is all done before this header file is
++ * included.
++ */
++#if !defined(__SCITECH_SNAP__)
++
++#if defined(__BEOS__)
++#include <stdlib.h> /* to get some BeOS-isms */
++#endif
++
++#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
++#define OPENSTEP
++#endif
++
++#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
++#define __WIN32__
++#endif
++
++#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
++# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
++# define GLAPI __declspec(dllexport)
++# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
++# define GLAPI __declspec(dllimport)
++# else /* for use with static link lib build of Win32 edition only */
++# define GLAPI extern
++# endif /* _STATIC_MESA support */
++# define GLAPIENTRY __stdcall
++#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
++# define GLAPI extern
++# define GLAPIENTRY __stdcall
++#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
++# define GLAPI __attribute__((visibility("default")))
++# define GLAPIENTRY
++#endif /* WIN32 && !CYGWIN */
++
++#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
++# define PRAGMA_EXPORT_SUPPORTED 1
++#endif
++
++/*
++ * WINDOWS: Include windows.h here to define APIENTRY.
++ * It is also useful when applications include this file by
++ * including only glut.h, since glut.h depends on windows.h.
++ * Applications needing to include windows.h with parms other
++ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
++ * glut.h or gl.h.
++ */
++#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
++#define WIN32_LEAN_AND_MEAN 1
++#include <windows.h>
++#endif
++
++#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
++#include <GL/mesa_wgl.h>
++#endif
++
++#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
++#pragma import on
++#endif
++
++#ifndef GLAPI
++#define GLAPI extern
++#endif
++
++#ifndef GLAPIENTRY
++#define GLAPIENTRY
++#endif
++
++#ifndef APIENTRY
++#define APIENTRY GLAPIENTRY
++#endif
++
++/* "P" suffix to be used for a pointer to a function */
++#ifndef APIENTRYP
++#define APIENTRYP APIENTRY *
++#endif
++
++#ifndef GLAPIENTRYP
++#define GLAPIENTRYP GLAPIENTRY *
++#endif
++
++#ifdef CENTERLINE_CLPP
++#define signed
++#endif
++
++#if defined(PRAGMA_EXPORT_SUPPORTED)
++#pragma export on
++#endif
++
++#endif /* !__SCITECH_SNAP__ */
++/*
++ * End system-specific stuff.
++ **********************************************************************/
++
++
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++
++
++#define GL_VERSION_1_1 1
++#define GL_VERSION_1_2 1
++#define GL_VERSION_1_3 1
++#define GL_ARB_imaging 1
++
++
++/*
++ * Datatypes
++ */
++typedef unsigned int GLenum;
++typedef unsigned char GLboolean;
++typedef unsigned int GLbitfield;
++typedef void GLvoid;
++typedef signed char GLbyte; /* 1-byte signed */
++typedef short GLshort; /* 2-byte signed */
++typedef int GLint; /* 4-byte signed */
++typedef unsigned char GLubyte; /* 1-byte unsigned */
++typedef unsigned short GLushort; /* 2-byte unsigned */
++typedef unsigned int GLuint; /* 4-byte unsigned */
++typedef int GLsizei; /* 4-byte signed */
++typedef float GLfloat; /* single precision float */
++typedef float GLclampf; /* single precision float in [0,1] */
++typedef double GLdouble; /* double precision float */
++typedef double GLclampd; /* double precision float in [0,1] */
++
++
++
++/*
++ * Constants
++ */
++
++/* Boolean values */
++#define GL_FALSE 0x0
++#define GL_TRUE 0x1
++
++/* Data types */
++#define GL_BYTE 0x1400
++#define GL_UNSIGNED_BYTE 0x1401
++#define GL_SHORT 0x1402
++#define GL_UNSIGNED_SHORT 0x1403
++#define GL_INT 0x1404
++#define GL_UNSIGNED_INT 0x1405
++#define GL_FLOAT 0x1406
++#define GL_2_BYTES 0x1407
++#define GL_3_BYTES 0x1408
++#define GL_4_BYTES 0x1409
++#define GL_DOUBLE 0x140A
++
++/* Primitives */
++#define GL_POINTS 0x0000
++#define GL_LINES 0x0001
++#define GL_LINE_LOOP 0x0002
++#define GL_LINE_STRIP 0x0003
++#define GL_TRIANGLES 0x0004
++#define GL_TRIANGLE_STRIP 0x0005
++#define GL_TRIANGLE_FAN 0x0006
++#define GL_QUADS 0x0007
++#define GL_QUAD_STRIP 0x0008
++#define GL_POLYGON 0x0009
++
++/* Vertex Arrays */
++#define GL_VERTEX_ARRAY 0x8074
++#define GL_NORMAL_ARRAY 0x8075
++#define GL_COLOR_ARRAY 0x8076
++#define GL_INDEX_ARRAY 0x8077
++#define GL_TEXTURE_COORD_ARRAY 0x8078
++#define GL_EDGE_FLAG_ARRAY 0x8079
++#define GL_VERTEX_ARRAY_SIZE 0x807A
++#define GL_VERTEX_ARRAY_TYPE 0x807B
++#define GL_VERTEX_ARRAY_STRIDE 0x807C
++#define GL_NORMAL_ARRAY_TYPE 0x807E
++#define GL_NORMAL_ARRAY_STRIDE 0x807F
++#define GL_COLOR_ARRAY_SIZE 0x8081
++#define GL_COLOR_ARRAY_TYPE 0x8082
++#define GL_COLOR_ARRAY_STRIDE 0x8083
++#define GL_INDEX_ARRAY_TYPE 0x8085
++#define GL_INDEX_ARRAY_STRIDE 0x8086
++#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
++#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
++#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
++#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
++#define GL_VERTEX_ARRAY_POINTER 0x808E
++#define GL_NORMAL_ARRAY_POINTER 0x808F
++#define GL_COLOR_ARRAY_POINTER 0x8090
++#define GL_INDEX_ARRAY_POINTER 0x8091
++#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
++#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
++#define GL_V2F 0x2A20
++#define GL_V3F 0x2A21
++#define GL_C4UB_V2F 0x2A22
++#define GL_C4UB_V3F 0x2A23
++#define GL_C3F_V3F 0x2A24
++#define GL_N3F_V3F 0x2A25
++#define GL_C4F_N3F_V3F 0x2A26
++#define GL_T2F_V3F 0x2A27
++#define GL_T4F_V4F 0x2A28
++#define GL_T2F_C4UB_V3F 0x2A29
++#define GL_T2F_C3F_V3F 0x2A2A
++#define GL_T2F_N3F_V3F 0x2A2B
++#define GL_T2F_C4F_N3F_V3F 0x2A2C
++#define GL_T4F_C4F_N3F_V4F 0x2A2D
++
++/* Matrix Mode */
++#define GL_MATRIX_MODE 0x0BA0
++#define GL_MODELVIEW 0x1700
++#define GL_PROJECTION 0x1701
++#define GL_TEXTURE 0x1702
++
++/* Points */
++#define GL_POINT_SMOOTH 0x0B10
++#define GL_POINT_SIZE 0x0B11
++#define GL_POINT_SIZE_GRANULARITY 0x0B13
++#define GL_POINT_SIZE_RANGE 0x0B12
++
++/* Lines */
++#define GL_LINE_SMOOTH 0x0B20
++#define GL_LINE_STIPPLE 0x0B24
++#define GL_LINE_STIPPLE_PATTERN 0x0B25
++#define GL_LINE_STIPPLE_REPEAT 0x0B26
++#define GL_LINE_WIDTH 0x0B21
++#define GL_LINE_WIDTH_GRANULARITY 0x0B23
++#define GL_LINE_WIDTH_RANGE 0x0B22
++
++/* Polygons */
++#define GL_POINT 0x1B00
++#define GL_LINE 0x1B01
++#define GL_FILL 0x1B02
++#define GL_CW 0x0900
++#define GL_CCW 0x0901
++#define GL_FRONT 0x0404
++#define GL_BACK 0x0405
++#define GL_POLYGON_MODE 0x0B40
++#define GL_POLYGON_SMOOTH 0x0B41
++#define GL_POLYGON_STIPPLE 0x0B42
++#define GL_EDGE_FLAG 0x0B43
++#define GL_CULL_FACE 0x0B44
++#define GL_CULL_FACE_MODE 0x0B45
++#define GL_FRONT_FACE 0x0B46
++#define GL_POLYGON_OFFSET_FACTOR 0x8038
++#define GL_POLYGON_OFFSET_UNITS 0x2A00
++#define GL_POLYGON_OFFSET_POINT 0x2A01
++#define GL_POLYGON_OFFSET_LINE 0x2A02
++#define GL_POLYGON_OFFSET_FILL 0x8037
++
++/* Display Lists */
++#define GL_COMPILE 0x1300
++#define GL_COMPILE_AND_EXECUTE 0x1301
++#define GL_LIST_BASE 0x0B32
++#define GL_LIST_INDEX 0x0B33
++#define GL_LIST_MODE 0x0B30
++
++/* Depth buffer */
++#define GL_NEVER 0x0200
++#define GL_LESS 0x0201
++#define GL_EQUAL 0x0202
++#define GL_LEQUAL 0x0203
++#define GL_GREATER 0x0204
++#define GL_NOTEQUAL 0x0205
++#define GL_GEQUAL 0x0206
++#define GL_ALWAYS 0x0207
++#define GL_DEPTH_TEST 0x0B71
++#define GL_DEPTH_BITS 0x0D56
++#define GL_DEPTH_CLEAR_VALUE 0x0B73
++#define GL_DEPTH_FUNC 0x0B74
++#define GL_DEPTH_RANGE 0x0B70
++#define GL_DEPTH_WRITEMASK 0x0B72
++#define GL_DEPTH_COMPONENT 0x1902
++
++/* Lighting */
++#define GL_LIGHTING 0x0B50
++#define GL_LIGHT0 0x4000
++#define GL_LIGHT1 0x4001
++#define GL_LIGHT2 0x4002
++#define GL_LIGHT3 0x4003
++#define GL_LIGHT4 0x4004
++#define GL_LIGHT5 0x4005
++#define GL_LIGHT6 0x4006
++#define GL_LIGHT7 0x4007
++#define GL_SPOT_EXPONENT 0x1205
++#define GL_SPOT_CUTOFF 0x1206
++#define GL_CONSTANT_ATTENUATION 0x1207
++#define GL_LINEAR_ATTENUATION 0x1208
++#define GL_QUADRATIC_ATTENUATION 0x1209
++#define GL_AMBIENT 0x1200
++#define GL_DIFFUSE 0x1201
++#define GL_SPECULAR 0x1202
++#define GL_SHININESS 0x1601
++#define GL_EMISSION 0x1600
++#define GL_POSITION 0x1203
++#define GL_SPOT_DIRECTION 0x1204
++#define GL_AMBIENT_AND_DIFFUSE 0x1602
++#define GL_COLOR_INDEXES 0x1603
++#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
++#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
++#define GL_LIGHT_MODEL_AMBIENT 0x0B53
++#define GL_FRONT_AND_BACK 0x0408
++#define GL_SHADE_MODEL 0x0B54
++#define GL_FLAT 0x1D00
++#define GL_SMOOTH 0x1D01
++#define GL_COLOR_MATERIAL 0x0B57
++#define GL_COLOR_MATERIAL_FACE 0x0B55
++#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
++#define GL_NORMALIZE 0x0BA1
++
++/* User clipping planes */
++#define GL_CLIP_PLANE0 0x3000
++#define GL_CLIP_PLANE1 0x3001
++#define GL_CLIP_PLANE2 0x3002
++#define GL_CLIP_PLANE3 0x3003
++#define GL_CLIP_PLANE4 0x3004
++#define GL_CLIP_PLANE5 0x3005
++
++/* Accumulation buffer */
++#define GL_ACCUM_RED_BITS 0x0D58
++#define GL_ACCUM_GREEN_BITS 0x0D59
++#define GL_ACCUM_BLUE_BITS 0x0D5A
++#define GL_ACCUM_ALPHA_BITS 0x0D5B
++#define GL_ACCUM_CLEAR_VALUE 0x0B80
++#define GL_ACCUM 0x0100
++#define GL_ADD 0x0104
++#define GL_LOAD 0x0101
++#define GL_MULT 0x0103
++#define GL_RETURN 0x0102
++
++/* Alpha testing */
++#define GL_ALPHA_TEST 0x0BC0
++#define GL_ALPHA_TEST_REF 0x0BC2
++#define GL_ALPHA_TEST_FUNC 0x0BC1
++
++/* Blending */
++#define GL_BLEND 0x0BE2
++#define GL_BLEND_SRC 0x0BE1
++#define GL_BLEND_DST 0x0BE0
++#define GL_ZERO 0x0
++#define GL_ONE 0x1
++#define GL_SRC_COLOR 0x0300
++#define GL_ONE_MINUS_SRC_COLOR 0x0301
++#define GL_SRC_ALPHA 0x0302
++#define GL_ONE_MINUS_SRC_ALPHA 0x0303
++#define GL_DST_ALPHA 0x0304
++#define GL_ONE_MINUS_DST_ALPHA 0x0305
++#define GL_DST_COLOR 0x0306
++#define GL_ONE_MINUS_DST_COLOR 0x0307
++#define GL_SRC_ALPHA_SATURATE 0x0308
++
++/* Render Mode */
++#define GL_FEEDBACK 0x1C01
++#define GL_RENDER 0x1C00
++#define GL_SELECT 0x1C02
++
++/* Feedback */
++#define GL_2D 0x0600
++#define GL_3D 0x0601
++#define GL_3D_COLOR 0x0602
++#define GL_3D_COLOR_TEXTURE 0x0603
++#define GL_4D_COLOR_TEXTURE 0x0604
++#define GL_POINT_TOKEN 0x0701
++#define GL_LINE_TOKEN 0x0702
++#define GL_LINE_RESET_TOKEN 0x0707
++#define GL_POLYGON_TOKEN 0x0703
++#define GL_BITMAP_TOKEN 0x0704
++#define GL_DRAW_PIXEL_TOKEN 0x0705
++#define GL_COPY_PIXEL_TOKEN 0x0706
++#define GL_PASS_THROUGH_TOKEN 0x0700
++#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
++#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
++#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
++
++/* Selection */
++#define GL_SELECTION_BUFFER_POINTER 0x0DF3
++#define GL_SELECTION_BUFFER_SIZE 0x0DF4
++
++/* Fog */
++#define GL_FOG 0x0B60
++#define GL_FOG_MODE 0x0B65
++#define GL_FOG_DENSITY 0x0B62
++#define GL_FOG_COLOR 0x0B66
++#define GL_FOG_INDEX 0x0B61
++#define GL_FOG_START 0x0B63
++#define GL_FOG_END 0x0B64
++#define GL_LINEAR 0x2601
++#define GL_EXP 0x0800
++#define GL_EXP2 0x0801
++
++/* Logic Ops */
++#define GL_LOGIC_OP 0x0BF1
++#define GL_INDEX_LOGIC_OP 0x0BF1
++#define GL_COLOR_LOGIC_OP 0x0BF2
++#define GL_LOGIC_OP_MODE 0x0BF0
++#define GL_CLEAR 0x1500
++#define GL_SET 0x150F
++#define GL_COPY 0x1503
++#define GL_COPY_INVERTED 0x150C
++#define GL_NOOP 0x1505
++#define GL_INVERT 0x150A
++#define GL_AND 0x1501
++#define GL_NAND 0x150E
++#define GL_OR 0x1507
++#define GL_NOR 0x1508
++#define GL_XOR 0x1506
++#define GL_EQUIV 0x1509
++#define GL_AND_REVERSE 0x1502
++#define GL_AND_INVERTED 0x1504
++#define GL_OR_REVERSE 0x150B
++#define GL_OR_INVERTED 0x150D
++
++/* Stencil */
++#define GL_STENCIL_BITS 0x0D57
++#define GL_STENCIL_TEST 0x0B90
++#define GL_STENCIL_CLEAR_VALUE 0x0B91
++#define GL_STENCIL_FUNC 0x0B92
++#define GL_STENCIL_VALUE_MASK 0x0B93
++#define GL_STENCIL_FAIL 0x0B94
++#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
++#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
++#define GL_STENCIL_REF 0x0B97
++#define GL_STENCIL_WRITEMASK 0x0B98
++#define GL_STENCIL_INDEX 0x1901
++#define GL_KEEP 0x1E00
++#define GL_REPLACE 0x1E01
++#define GL_INCR 0x1E02
++#define GL_DECR 0x1E03
++
++/* Buffers, Pixel Drawing/Reading */
++#define GL_NONE 0x0
++#define GL_LEFT 0x0406
++#define GL_RIGHT 0x0407
++/*GL_FRONT 0x0404 */
++/*GL_BACK 0x0405 */
++/*GL_FRONT_AND_BACK 0x0408 */
++#define GL_FRONT_LEFT 0x0400
++#define GL_FRONT_RIGHT 0x0401
++#define GL_BACK_LEFT 0x0402
++#define GL_BACK_RIGHT 0x0403
++#define GL_AUX0 0x0409
++#define GL_AUX1 0x040A
++#define GL_AUX2 0x040B
++#define GL_AUX3 0x040C
++#define GL_COLOR_INDEX 0x1900
++#define GL_RED 0x1903
++#define GL_GREEN 0x1904
++#define GL_BLUE 0x1905
++#define GL_ALPHA 0x1906
++#define GL_LUMINANCE 0x1909
++#define GL_LUMINANCE_ALPHA 0x190A
++#define GL_ALPHA_BITS 0x0D55
++#define GL_RED_BITS 0x0D52
++#define GL_GREEN_BITS 0x0D53
++#define GL_BLUE_BITS 0x0D54
++#define GL_INDEX_BITS 0x0D51
++#define GL_SUBPIXEL_BITS 0x0D50
++#define GL_AUX_BUFFERS 0x0C00
++#define GL_READ_BUFFER 0x0C02
++#define GL_DRAW_BUFFER 0x0C01
++#define GL_DOUBLEBUFFER 0x0C32
++#define GL_STEREO 0x0C33
++#define GL_BITMAP 0x1A00
++#define GL_COLOR 0x1800
++#define GL_DEPTH 0x1801
++#define GL_STENCIL 0x1802
++#define GL_DITHER 0x0BD0
++#define GL_RGB 0x1907
++#define GL_RGBA 0x1908
++
++/* Implementation limits */
++#define GL_MAX_LIST_NESTING 0x0B31
++#define GL_MAX_EVAL_ORDER 0x0D30
++#define GL_MAX_LIGHTS 0x0D31
++#define GL_MAX_CLIP_PLANES 0x0D32
++#define GL_MAX_TEXTURE_SIZE 0x0D33
++#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
++#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
++#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
++#define GL_MAX_NAME_STACK_DEPTH 0x0D37
++#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
++#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
++#define GL_MAX_VIEWPORT_DIMS 0x0D3A
++#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
++
++/* Gets */
++#define GL_ATTRIB_STACK_DEPTH 0x0BB0
++#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
++#define GL_COLOR_CLEAR_VALUE 0x0C22
++#define GL_COLOR_WRITEMASK 0x0C23
++#define GL_CURRENT_INDEX 0x0B01
++#define GL_CURRENT_COLOR 0x0B00
++#define GL_CURRENT_NORMAL 0x0B02
++#define GL_CURRENT_RASTER_COLOR 0x0B04
++#define GL_CURRENT_RASTER_DISTANCE 0x0B09
++#define GL_CURRENT_RASTER_INDEX 0x0B05
++#define GL_CURRENT_RASTER_POSITION 0x0B07
++#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
++#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
++#define GL_CURRENT_TEXTURE_COORDS 0x0B03
++#define GL_INDEX_CLEAR_VALUE 0x0C20
++#define GL_INDEX_MODE 0x0C30
++#define GL_INDEX_WRITEMASK 0x0C21
++#define GL_MODELVIEW_MATRIX 0x0BA6
++#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
++#define GL_NAME_STACK_DEPTH 0x0D70
++#define GL_PROJECTION_MATRIX 0x0BA7
++#define GL_PROJECTION_STACK_DEPTH 0x0BA4
++#define GL_RENDER_MODE 0x0C40
++#define GL_RGBA_MODE 0x0C31
++#define GL_TEXTURE_MATRIX 0x0BA8
++#define GL_TEXTURE_STACK_DEPTH 0x0BA5
++#define GL_VIEWPORT 0x0BA2
++
++/* Evaluators */
++#define GL_AUTO_NORMAL 0x0D80
++#define GL_MAP1_COLOR_4 0x0D90
++#define GL_MAP1_INDEX 0x0D91
++#define GL_MAP1_NORMAL 0x0D92
++#define GL_MAP1_TEXTURE_COORD_1 0x0D93
++#define GL_MAP1_TEXTURE_COORD_2 0x0D94
++#define GL_MAP1_TEXTURE_COORD_3 0x0D95
++#define GL_MAP1_TEXTURE_COORD_4 0x0D96
++#define GL_MAP1_VERTEX_3 0x0D97
++#define GL_MAP1_VERTEX_4 0x0D98
++#define GL_MAP2_COLOR_4 0x0DB0
++#define GL_MAP2_INDEX 0x0DB1
++#define GL_MAP2_NORMAL 0x0DB2
++#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
++#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
++#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
++#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
++#define GL_MAP2_VERTEX_3 0x0DB7
++#define GL_MAP2_VERTEX_4 0x0DB8
++#define GL_MAP1_GRID_DOMAIN 0x0DD0
++#define GL_MAP1_GRID_SEGMENTS 0x0DD1
++#define GL_MAP2_GRID_DOMAIN 0x0DD2
++#define GL_MAP2_GRID_SEGMENTS 0x0DD3
++#define GL_COEFF 0x0A00
++#define GL_ORDER 0x0A01
++#define GL_DOMAIN 0x0A02
++
++/* Hints */
++#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
++#define GL_POINT_SMOOTH_HINT 0x0C51
++#define GL_LINE_SMOOTH_HINT 0x0C52
++#define GL_POLYGON_SMOOTH_HINT 0x0C53
++#define GL_FOG_HINT 0x0C54
++#define GL_DONT_CARE 0x1100
++#define GL_FASTEST 0x1101
++#define GL_NICEST 0x1102
++
++/* Scissor box */
++#define GL_SCISSOR_BOX 0x0C10
++#define GL_SCISSOR_TEST 0x0C11
++
++/* Pixel Mode / Transfer */
++#define GL_MAP_COLOR 0x0D10
++#define GL_MAP_STENCIL 0x0D11
++#define GL_INDEX_SHIFT 0x0D12
++#define GL_INDEX_OFFSET 0x0D13
++#define GL_RED_SCALE 0x0D14
++#define GL_RED_BIAS 0x0D15
++#define GL_GREEN_SCALE 0x0D18
++#define GL_GREEN_BIAS 0x0D19
++#define GL_BLUE_SCALE 0x0D1A
++#define GL_BLUE_BIAS 0x0D1B
++#define GL_ALPHA_SCALE 0x0D1C
++#define GL_ALPHA_BIAS 0x0D1D
++#define GL_DEPTH_SCALE 0x0D1E
++#define GL_DEPTH_BIAS 0x0D1F
++#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
++#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
++#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
++#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
++#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
++#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
++#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
++#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
++#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
++#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
++#define GL_PIXEL_MAP_S_TO_S 0x0C71
++#define GL_PIXEL_MAP_I_TO_I 0x0C70
++#define GL_PIXEL_MAP_I_TO_R 0x0C72
++#define GL_PIXEL_MAP_I_TO_G 0x0C73
++#define GL_PIXEL_MAP_I_TO_B 0x0C74
++#define GL_PIXEL_MAP_I_TO_A 0x0C75
++#define GL_PIXEL_MAP_R_TO_R 0x0C76
++#define GL_PIXEL_MAP_G_TO_G 0x0C77
++#define GL_PIXEL_MAP_B_TO_B 0x0C78
++#define GL_PIXEL_MAP_A_TO_A 0x0C79
++#define GL_PACK_ALIGNMENT 0x0D05
++#define GL_PACK_LSB_FIRST 0x0D01
++#define GL_PACK_ROW_LENGTH 0x0D02
++#define GL_PACK_SKIP_PIXELS 0x0D04
++#define GL_PACK_SKIP_ROWS 0x0D03
++#define GL_PACK_SWAP_BYTES 0x0D00
++#define GL_UNPACK_ALIGNMENT 0x0CF5
++#define GL_UNPACK_LSB_FIRST 0x0CF1
++#define GL_UNPACK_ROW_LENGTH 0x0CF2
++#define GL_UNPACK_SKIP_PIXELS 0x0CF4
++#define GL_UNPACK_SKIP_ROWS 0x0CF3
++#define GL_UNPACK_SWAP_BYTES 0x0CF0
++#define GL_ZOOM_X 0x0D16
++#define GL_ZOOM_Y 0x0D17
++
++/* Texture mapping */
++#define GL_TEXTURE_ENV 0x2300
++#define GL_TEXTURE_ENV_MODE 0x2200
++#define GL_TEXTURE_1D 0x0DE0
++#define GL_TEXTURE_2D 0x0DE1
++#define GL_TEXTURE_WRAP_S 0x2802
++#define GL_TEXTURE_WRAP_T 0x2803
++#define GL_TEXTURE_MAG_FILTER 0x2800
++#define GL_TEXTURE_MIN_FILTER 0x2801
++#define GL_TEXTURE_ENV_COLOR 0x2201
++#define GL_TEXTURE_GEN_S 0x0C60
++#define GL_TEXTURE_GEN_T 0x0C61
++#define GL_TEXTURE_GEN_MODE 0x2500
++#define GL_TEXTURE_BORDER_COLOR 0x1004
++#define GL_TEXTURE_WIDTH 0x1000
++#define GL_TEXTURE_HEIGHT 0x1001
++#define GL_TEXTURE_BORDER 0x1005
++#define GL_TEXTURE_COMPONENTS 0x1003
++#define GL_TEXTURE_RED_SIZE 0x805C
++#define GL_TEXTURE_GREEN_SIZE 0x805D
++#define GL_TEXTURE_BLUE_SIZE 0x805E
++#define GL_TEXTURE_ALPHA_SIZE 0x805F
++#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
++#define GL_TEXTURE_INTENSITY_SIZE 0x8061
++#define GL_NEAREST_MIPMAP_NEAREST 0x2700
++#define GL_NEAREST_MIPMAP_LINEAR 0x2702
++#define GL_LINEAR_MIPMAP_NEAREST 0x2701
++#define GL_LINEAR_MIPMAP_LINEAR 0x2703
++#define GL_OBJECT_LINEAR 0x2401
++#define GL_OBJECT_PLANE 0x2501
++#define GL_EYE_LINEAR 0x2400
++#define GL_EYE_PLANE 0x2502
++#define GL_SPHERE_MAP 0x2402
++#define GL_DECAL 0x2101
++#define GL_MODULATE 0x2100
++#define GL_NEAREST 0x2600
++#define GL_REPEAT 0x2901
++#define GL_CLAMP 0x2900
++#define GL_S 0x2000
++#define GL_T 0x2001
++#define GL_R 0x2002
++#define GL_Q 0x2003
++#define GL_TEXTURE_GEN_R 0x0C62
++#define GL_TEXTURE_GEN_Q 0x0C63
++
++/* Utility */
++#define GL_VENDOR 0x1F00
++#define GL_RENDERER 0x1F01
++#define GL_VERSION 0x1F02
++#define GL_EXTENSIONS 0x1F03
++
++/* Errors */
++#define GL_NO_ERROR 0x0
++#define GL_INVALID_ENUM 0x0500
++#define GL_INVALID_VALUE 0x0501
++#define GL_INVALID_OPERATION 0x0502
++#define GL_STACK_OVERFLOW 0x0503
++#define GL_STACK_UNDERFLOW 0x0504
++#define GL_OUT_OF_MEMORY 0x0505
++
++/* glPush/PopAttrib bits */
++#define GL_CURRENT_BIT 0x00000001
++#define GL_POINT_BIT 0x00000002
++#define GL_LINE_BIT 0x00000004
++#define GL_POLYGON_BIT 0x00000008
++#define GL_POLYGON_STIPPLE_BIT 0x00000010
++#define GL_PIXEL_MODE_BIT 0x00000020
++#define GL_LIGHTING_BIT 0x00000040
++#define GL_FOG_BIT 0x00000080
++#define GL_DEPTH_BUFFER_BIT 0x00000100
++#define GL_ACCUM_BUFFER_BIT 0x00000200
++#define GL_STENCIL_BUFFER_BIT 0x00000400
++#define GL_VIEWPORT_BIT 0x00000800
++#define GL_TRANSFORM_BIT 0x00001000
++#define GL_ENABLE_BIT 0x00002000
++#define GL_COLOR_BUFFER_BIT 0x00004000
++#define GL_HINT_BIT 0x00008000
++#define GL_EVAL_BIT 0x00010000
++#define GL_LIST_BIT 0x00020000
++#define GL_TEXTURE_BIT 0x00040000
++#define GL_SCISSOR_BIT 0x00080000
++#define GL_ALL_ATTRIB_BITS 0x000FFFFF
++
++
++/* OpenGL 1.1 */
++#define GL_PROXY_TEXTURE_1D 0x8063
++#define GL_PROXY_TEXTURE_2D 0x8064
++#define GL_TEXTURE_PRIORITY 0x8066
++#define GL_TEXTURE_RESIDENT 0x8067
++#define GL_TEXTURE_BINDING_1D 0x8068
++#define GL_TEXTURE_BINDING_2D 0x8069
++#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
++#define GL_ALPHA4 0x803B
++#define GL_ALPHA8 0x803C
++#define GL_ALPHA12 0x803D
++#define GL_ALPHA16 0x803E
++#define GL_LUMINANCE4 0x803F
++#define GL_LUMINANCE8 0x8040
++#define GL_LUMINANCE12 0x8041
++#define GL_LUMINANCE16 0x8042
++#define GL_LUMINANCE4_ALPHA4 0x8043
++#define GL_LUMINANCE6_ALPHA2 0x8044
++#define GL_LUMINANCE8_ALPHA8 0x8045
++#define GL_LUMINANCE12_ALPHA4 0x8046
++#define GL_LUMINANCE12_ALPHA12 0x8047
++#define GL_LUMINANCE16_ALPHA16 0x8048
++#define GL_INTENSITY 0x8049
++#define GL_INTENSITY4 0x804A
++#define GL_INTENSITY8 0x804B
++#define GL_INTENSITY12 0x804C
++#define GL_INTENSITY16 0x804D
++#define GL_R3_G3_B2 0x2A10
++#define GL_RGB4 0x804F
++#define GL_RGB5 0x8050
++#define GL_RGB8 0x8051
++#define GL_RGB10 0x8052
++#define GL_RGB12 0x8053
++#define GL_RGB16 0x8054
++#define GL_RGBA2 0x8055
++#define GL_RGBA4 0x8056
++#define GL_RGB5_A1 0x8057
++#define GL_RGBA8 0x8058
++#define GL_RGB10_A2 0x8059
++#define GL_RGBA12 0x805A
++#define GL_RGBA16 0x805B
++#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
++#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
++#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
++#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
++
++
++
++/*
++ * Miscellaneous
++ */
++
++GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
++
++GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
++
++GLAPI void GLAPIENTRY glClear( GLbitfield mask );
++
++GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
++
++GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
++
++GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
++
++GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
++
++GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
++
++GLAPI void GLAPIENTRY glCullFace( GLenum mode );
++
++GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
++
++GLAPI void GLAPIENTRY glPointSize( GLfloat size );
++
++GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
++
++GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
++
++GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
++
++GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
++
++GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
++
++GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
++
++GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
++
++GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
++
++GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
++
++GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
++
++GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
++
++GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
++
++GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
++
++GLAPI void GLAPIENTRY glEnable( GLenum cap );
++
++GLAPI void GLAPIENTRY glDisable( GLenum cap );
++
++GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
++
++
++GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
++
++GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
++
++
++GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
++
++GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
++
++GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
++
++
++GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
++
++GLAPI void GLAPIENTRY glPopAttrib( void );
++
++
++GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
++
++GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
++
++
++GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
++
++GLAPI GLenum GLAPIENTRY glGetError( void );
++
++GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
++
++GLAPI void GLAPIENTRY glFinish( void );
++
++GLAPI void GLAPIENTRY glFlush( void );
++
++GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
++
++
++/*
++ * Depth Buffer
++ */
++
++GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
++
++GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
++
++GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
++
++GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
++
++
++/*
++ * Accumulation Buffer
++ */
++
++GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
++
++GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
++
++
++/*
++ * Transformation
++ */
++
++GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
++
++GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
++ GLdouble bottom, GLdouble top,
++ GLdouble near_val, GLdouble far_val );
++
++GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
++ GLdouble bottom, GLdouble top,
++ GLdouble near_val, GLdouble far_val );
++
++GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
++ GLsizei width, GLsizei height );
++
++GLAPI void GLAPIENTRY glPushMatrix( void );
++
++GLAPI void GLAPIENTRY glPopMatrix( void );
++
++GLAPI void GLAPIENTRY glLoadIdentity( void );
++
++GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
++GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
++
++GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
++GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
++
++GLAPI void GLAPIENTRY glRotated( GLdouble angle,
++ GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
++ GLfloat x, GLfloat y, GLfloat z );
++
++GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
++
++GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
++
++
++/*
++ * Display Lists
++ */
++
++GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
++
++GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
++
++GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
++
++GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
++
++GLAPI void GLAPIENTRY glEndList( void );
++
++GLAPI void GLAPIENTRY glCallList( GLuint list );
++
++GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
++ const GLvoid *lists );
++
++GLAPI void GLAPIENTRY glListBase( GLuint base );
++
++
++/*
++ * Drawing Functions
++ */
++
++GLAPI void GLAPIENTRY glBegin( GLenum mode );
++
++GLAPI void GLAPIENTRY glEnd( void );
++
++
++GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
++GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
++GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
++GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
++
++GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
++GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
++GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
++
++GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
++GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
++GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
++GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
++
++GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
++GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
++GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
++GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
++GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
++GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
++GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
++GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
++
++GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
++GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
++GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glIndexd( GLdouble c );
++GLAPI void GLAPIENTRY glIndexf( GLfloat c );
++GLAPI void GLAPIENTRY glIndexi( GLint c );
++GLAPI void GLAPIENTRY glIndexs( GLshort c );
++GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
++
++GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
++GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
++GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
++GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
++GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
++
++GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
++GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
++GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
++GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
++GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
++GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
++GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
++GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
++
++GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
++ GLbyte blue, GLbyte alpha );
++GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
++ GLdouble blue, GLdouble alpha );
++GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
++ GLfloat blue, GLfloat alpha );
++GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
++ GLint blue, GLint alpha );
++GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
++ GLshort blue, GLshort alpha );
++GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
++ GLubyte blue, GLubyte alpha );
++GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
++ GLuint blue, GLuint alpha );
++GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
++ GLushort blue, GLushort alpha );
++
++
++GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
++GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
++GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
++GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
++GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
++GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
++
++GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
++GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
++GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
++GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
++GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
++GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
++
++
++GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
++GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
++GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
++GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
++
++GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
++GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
++GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
++GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
++
++GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
++GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
++GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
++GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
++
++GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
++GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
++GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
++GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
++
++GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
++GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
++GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
++GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
++GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
++GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
++GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
++GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
++
++GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
++GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
++GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
++
++GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
++GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
++GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
++GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
++
++GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
++GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
++GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
++GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
++GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
++GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
++GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
++
++
++GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
++GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
++GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
++GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
++
++
++/*
++ * Vertex Arrays (1.1)
++ */
++
++GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
++ GLsizei stride, const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
++ const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
++ GLsizei stride, const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
++ const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
++ GLsizei stride, const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
++
++GLAPI void GLAPIENTRY glArrayElement( GLint i );
++
++GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
++
++GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
++ GLenum type, const GLvoid *indices );
++
++GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
++ const GLvoid *pointer );
++
++/*
++ * Lighting
++ */
++
++GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
++
++GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
++GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
++ const GLfloat *params );
++GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
++ const GLint *params );
++
++GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
++ GLfloat *params );
++GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
++GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
++GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
++
++GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
++GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
++GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
++
++GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
++GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
++
++GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
++
++
++/*
++ * Raster functions
++ */
++
++GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
++
++GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
++ const GLfloat *values );
++GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
++ const GLuint *values );
++GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
++ const GLushort *values );
++
++GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
++GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
++GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
++
++GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
++ GLfloat xorig, GLfloat yorig,
++ GLfloat xmove, GLfloat ymove,
++ const GLubyte *bitmap );
++
++GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
++ GLsizei width, GLsizei height,
++ GLenum format, GLenum type,
++ GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
++ GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
++ GLsizei width, GLsizei height,
++ GLenum type );
++
++/*
++ * Stenciling
++ */
++
++GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
++
++GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
++
++GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
++
++GLAPI void GLAPIENTRY glClearStencil( GLint s );
++
++
++
++/*
++ * Texture mapping
++ */
++
++GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
++GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
++GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
++GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
++
++GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
++GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
++GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
++
++
++GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
++GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
++
++GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
++GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
++
++
++GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
++ const GLfloat *params );
++GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
++ const GLint *params );
++
++GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
++ GLenum pname, GLfloat *params);
++GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
++ GLenum pname, GLint *params );
++
++GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
++ GLenum pname, GLfloat *params );
++GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
++ GLenum pname, GLint *params );
++
++
++GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
++ GLint internalFormat,
++ GLsizei width, GLint border,
++ GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
++ GLint internalFormat,
++ GLsizei width, GLsizei height,
++ GLint border, GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
++ GLenum format, GLenum type,
++ GLvoid *pixels );
++
++
++/* 1.1 functions */
++
++GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
++
++GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
++
++GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
++
++GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
++ const GLuint *textures,
++ const GLclampf *priorities );
++
++GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
++ const GLuint *textures,
++ GLboolean *residences );
++
++GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
++
++
++GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
++ GLint xoffset,
++ GLsizei width, GLenum format,
++ GLenum type, const GLvoid *pixels );
++
++
++GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
++ GLint xoffset, GLint yoffset,
++ GLsizei width, GLsizei height,
++ GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++
++GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
++ GLenum internalformat,
++ GLint x, GLint y,
++ GLsizei width, GLint border );
++
++
++GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
++ GLenum internalformat,
++ GLint x, GLint y,
++ GLsizei width, GLsizei height,
++ GLint border );
++
++
++GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
++ GLint xoffset, GLint x, GLint y,
++ GLsizei width );
++
++
++GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
++ GLint xoffset, GLint yoffset,
++ GLint x, GLint y,
++ GLsizei width, GLsizei height );
++
++
++/*
++ * Evaluators
++ */
++
++GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
++ GLint stride,
++ GLint order, const GLdouble *points );
++GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
++ GLint stride,
++ GLint order, const GLfloat *points );
++
++GLAPI void GLAPIENTRY glMap2d( GLenum target,
++ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
++ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
++ const GLdouble *points );
++GLAPI void GLAPIENTRY glMap2f( GLenum target,
++ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
++ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
++ const GLfloat *points );
++
++GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
++GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
++GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
++
++GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
++GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
++
++GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
++GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
++
++GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
++GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
++
++GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
++GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
++
++GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
++GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
++
++GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
++ GLint vn, GLdouble v1, GLdouble v2 );
++GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
++ GLint vn, GLfloat v1, GLfloat v2 );
++
++GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
++
++GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
++
++GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
++
++GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
++
++
++/*
++ * Fog
++ */
++
++GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
++
++GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
++
++GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
++
++
++/*
++ * Selection and Feedback
++ */
++
++GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
++
++GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
++
++GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
++
++GLAPI void GLAPIENTRY glInitNames( void );
++
++GLAPI void GLAPIENTRY glLoadName( GLuint name );
++
++GLAPI void GLAPIENTRY glPushName( GLuint name );
++
++GLAPI void GLAPIENTRY glPopName( void );
++
++
++
++/*
++ * OpenGL 1.2
++ */
++
++#define GL_RESCALE_NORMAL 0x803A
++#define GL_CLAMP_TO_EDGE 0x812F
++#define GL_MAX_ELEMENTS_VERTICES 0x80E8
++#define GL_MAX_ELEMENTS_INDICES 0x80E9
++#define GL_BGR 0x80E0
++#define GL_BGRA 0x80E1
++#define GL_UNSIGNED_BYTE_3_3_2 0x8032
++#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
++#define GL_UNSIGNED_SHORT_5_6_5 0x8363
++#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
++#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
++#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
++#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
++#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
++#define GL_UNSIGNED_INT_8_8_8_8 0x8035
++#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
++#define GL_UNSIGNED_INT_10_10_10_2 0x8036
++#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
++#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
++#define GL_SINGLE_COLOR 0x81F9
++#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
++#define GL_TEXTURE_MIN_LOD 0x813A
++#define GL_TEXTURE_MAX_LOD 0x813B
++#define GL_TEXTURE_BASE_LEVEL 0x813C
++#define GL_TEXTURE_MAX_LEVEL 0x813D
++#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
++#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
++#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
++#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
++#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
++#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
++#define GL_PACK_SKIP_IMAGES 0x806B
++#define GL_PACK_IMAGE_HEIGHT 0x806C
++#define GL_UNPACK_SKIP_IMAGES 0x806D
++#define GL_UNPACK_IMAGE_HEIGHT 0x806E
++#define GL_TEXTURE_3D 0x806F
++#define GL_PROXY_TEXTURE_3D 0x8070
++#define GL_TEXTURE_DEPTH 0x8071
++#define GL_TEXTURE_WRAP_R 0x8072
++#define GL_MAX_3D_TEXTURE_SIZE 0x8073
++#define GL_TEXTURE_BINDING_3D 0x806A
++
++GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
++ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
++
++GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
++ GLint internalFormat,
++ GLsizei width, GLsizei height,
++ GLsizei depth, GLint border,
++ GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
++ GLint xoffset, GLint yoffset,
++ GLint zoffset, GLsizei width,
++ GLsizei height, GLsizei depth,
++ GLenum format,
++ GLenum type, const GLvoid *pixels);
++
++GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
++ GLint xoffset, GLint yoffset,
++ GLint zoffset, GLint x,
++ GLint y, GLsizei width,
++ GLsizei height );
++
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
++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);
++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);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
++
++
++/*
++ * GL_ARB_imaging
++ */
++
++#define GL_CONSTANT_COLOR 0x8001
++#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
++#define GL_CONSTANT_ALPHA 0x8003
++#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
++#define GL_COLOR_TABLE 0x80D0
++#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
++#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
++#define GL_PROXY_COLOR_TABLE 0x80D3
++#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
++#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
++#define GL_COLOR_TABLE_SCALE 0x80D6
++#define GL_COLOR_TABLE_BIAS 0x80D7
++#define GL_COLOR_TABLE_FORMAT 0x80D8
++#define GL_COLOR_TABLE_WIDTH 0x80D9
++#define GL_COLOR_TABLE_RED_SIZE 0x80DA
++#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
++#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
++#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
++#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
++#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
++#define GL_CONVOLUTION_1D 0x8010
++#define GL_CONVOLUTION_2D 0x8011
++#define GL_SEPARABLE_2D 0x8012
++#define GL_CONVOLUTION_BORDER_MODE 0x8013
++#define GL_CONVOLUTION_FILTER_SCALE 0x8014
++#define GL_CONVOLUTION_FILTER_BIAS 0x8015
++#define GL_REDUCE 0x8016
++#define GL_CONVOLUTION_FORMAT 0x8017
++#define GL_CONVOLUTION_WIDTH 0x8018
++#define GL_CONVOLUTION_HEIGHT 0x8019
++#define GL_MAX_CONVOLUTION_WIDTH 0x801A
++#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
++#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
++#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
++#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
++#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
++#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
++#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
++#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
++#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
++#define GL_CONSTANT_BORDER 0x8151
++#define GL_REPLICATE_BORDER 0x8153
++#define GL_CONVOLUTION_BORDER_COLOR 0x8154
++#define GL_COLOR_MATRIX 0x80B1
++#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
++#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
++#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
++#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
++#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
++#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
++#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
++#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
++#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
++#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
++#define GL_HISTOGRAM 0x8024
++#define GL_PROXY_HISTOGRAM 0x8025
++#define GL_HISTOGRAM_WIDTH 0x8026
++#define GL_HISTOGRAM_FORMAT 0x8027
++#define GL_HISTOGRAM_RED_SIZE 0x8028
++#define GL_HISTOGRAM_GREEN_SIZE 0x8029
++#define GL_HISTOGRAM_BLUE_SIZE 0x802A
++#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
++#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
++#define GL_HISTOGRAM_SINK 0x802D
++#define GL_MINMAX 0x802E
++#define GL_MINMAX_FORMAT 0x802F
++#define GL_MINMAX_SINK 0x8030
++#define GL_TABLE_TOO_LARGE 0x8031
++#define GL_BLEND_EQUATION 0x8009
++#define GL_MIN 0x8007
++#define GL_MAX 0x8008
++#define GL_FUNC_ADD 0x8006
++#define GL_FUNC_SUBTRACT 0x800A
++#define GL_FUNC_REVERSE_SUBTRACT 0x800B
++#define GL_BLEND_COLOR 0x8005
++
++
++GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
++ GLsizei width, GLenum format,
++ GLenum type, const GLvoid *table );
++
++GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
++ GLsizei start, GLsizei count,
++ GLenum format, GLenum type,
++ const GLvoid *data );
++
++GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
++ const GLint *params);
++
++GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
++ const GLfloat *params);
++
++GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
++ GLint x, GLint y, GLsizei width );
++
++GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
++ GLint x, GLint y, GLsizei width );
++
++GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
++ GLenum type, GLvoid *table );
++
++GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
++ GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
++
++GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
++ GLclampf blue, GLclampf alpha );
++
++GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
++ GLenum internalformat, GLboolean sink );
++
++GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
++
++GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
++ GLenum format, GLenum type,
++ GLvoid *values );
++
++GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
++ GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
++ GLboolean sink );
++
++GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
++
++GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
++ GLenum format, GLenum types,
++ GLvoid *values );
++
++GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
++ GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
++ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
++ const GLvoid *image );
++
++GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
++ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
++ GLenum type, const GLvoid *image );
++
++GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
++ GLfloat params );
++
++GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
++ const GLfloat *params );
++
++GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
++ GLint params );
++
++GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
++ const GLint *params );
++
++GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
++ GLenum internalformat, GLint x, GLint y, GLsizei width );
++
++GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
++ GLenum internalformat, GLint x, GLint y, GLsizei width,
++ GLsizei height);
++
++GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
++ GLenum type, GLvoid *image );
++
++GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
++ GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
++ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
++ GLenum type, const GLvoid *row, const GLvoid *column );
++
++GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
++ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
++
++typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
++typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
++typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
++typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
++
++
++
++/*
++ * OpenGL 1.3
++ */
++
++/* multitexture */
++#define GL_TEXTURE0 0x84C0
++#define GL_TEXTURE1 0x84C1
++#define GL_TEXTURE2 0x84C2
++#define GL_TEXTURE3 0x84C3
++#define GL_TEXTURE4 0x84C4
++#define GL_TEXTURE5 0x84C5
++#define GL_TEXTURE6 0x84C6
++#define GL_TEXTURE7 0x84C7
++#define GL_TEXTURE8 0x84C8
++#define GL_TEXTURE9 0x84C9
++#define GL_TEXTURE10 0x84CA
++#define GL_TEXTURE11 0x84CB
++#define GL_TEXTURE12 0x84CC
++#define GL_TEXTURE13 0x84CD
++#define GL_TEXTURE14 0x84CE
++#define GL_TEXTURE15 0x84CF
++#define GL_TEXTURE16 0x84D0
++#define GL_TEXTURE17 0x84D1
++#define GL_TEXTURE18 0x84D2
++#define GL_TEXTURE19 0x84D3
++#define GL_TEXTURE20 0x84D4
++#define GL_TEXTURE21 0x84D5
++#define GL_TEXTURE22 0x84D6
++#define GL_TEXTURE23 0x84D7
++#define GL_TEXTURE24 0x84D8
++#define GL_TEXTURE25 0x84D9
++#define GL_TEXTURE26 0x84DA
++#define GL_TEXTURE27 0x84DB
++#define GL_TEXTURE28 0x84DC
++#define GL_TEXTURE29 0x84DD
++#define GL_TEXTURE30 0x84DE
++#define GL_TEXTURE31 0x84DF
++#define GL_ACTIVE_TEXTURE 0x84E0
++#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
++#define GL_MAX_TEXTURE_UNITS 0x84E2
++/* texture_cube_map */
++#define GL_NORMAL_MAP 0x8511
++#define GL_REFLECTION_MAP 0x8512
++#define GL_TEXTURE_CUBE_MAP 0x8513
++#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
++#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
++/* texture_compression */
++#define GL_COMPRESSED_ALPHA 0x84E9
++#define GL_COMPRESSED_LUMINANCE 0x84EA
++#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
++#define GL_COMPRESSED_INTENSITY 0x84EC
++#define GL_COMPRESSED_RGB 0x84ED
++#define GL_COMPRESSED_RGBA 0x84EE
++#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
++#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
++#define GL_TEXTURE_COMPRESSED 0x86A1
++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
++#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
++/* multisample */
++#define GL_MULTISAMPLE 0x809D
++#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
++#define GL_SAMPLE_COVERAGE 0x80A0
++#define GL_SAMPLE_BUFFERS 0x80A8
++#define GL_SAMPLES 0x80A9
++#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
++#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
++#define GL_MULTISAMPLE_BIT 0x20000000
++/* transpose_matrix */
++#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
++#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
++#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
++#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
++/* texture_env_combine */
++#define GL_COMBINE 0x8570
++#define GL_COMBINE_RGB 0x8571
++#define GL_COMBINE_ALPHA 0x8572
++#define GL_SOURCE0_RGB 0x8580
++#define GL_SOURCE1_RGB 0x8581
++#define GL_SOURCE2_RGB 0x8582
++#define GL_SOURCE0_ALPHA 0x8588
++#define GL_SOURCE1_ALPHA 0x8589
++#define GL_SOURCE2_ALPHA 0x858A
++#define GL_OPERAND0_RGB 0x8590
++#define GL_OPERAND1_RGB 0x8591
++#define GL_OPERAND2_RGB 0x8592
++#define GL_OPERAND0_ALPHA 0x8598
++#define GL_OPERAND1_ALPHA 0x8599
++#define GL_OPERAND2_ALPHA 0x859A
++#define GL_RGB_SCALE 0x8573
++#define GL_ADD_SIGNED 0x8574
++#define GL_INTERPOLATE 0x8575
++#define GL_SUBTRACT 0x84E7
++#define GL_CONSTANT 0x8576
++#define GL_PRIMARY_COLOR 0x8577
++#define GL_PREVIOUS 0x8578
++/* texture_env_dot3 */
++#define GL_DOT3_RGB 0x86AE
++#define GL_DOT3_RGBA 0x86AF
++/* texture_border_clamp */
++#define GL_CLAMP_TO_BORDER 0x812D
++
++GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
++
++GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
++
++GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
++
++GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
++
++GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
++
++GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
++
++GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
++
++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 );
++
++GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
++
++GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
++
++GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
++
++GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
++
++GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
++
++typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
++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);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
++
++
++/*
++ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
++ */
++#ifndef GL_ARB_multitexture
++#define GL_ARB_multitexture 1
++
++#define GL_TEXTURE0_ARB 0x84C0
++#define GL_TEXTURE1_ARB 0x84C1
++#define GL_TEXTURE2_ARB 0x84C2
++#define GL_TEXTURE3_ARB 0x84C3
++#define GL_TEXTURE4_ARB 0x84C4
++#define GL_TEXTURE5_ARB 0x84C5
++#define GL_TEXTURE6_ARB 0x84C6
++#define GL_TEXTURE7_ARB 0x84C7
++#define GL_TEXTURE8_ARB 0x84C8
++#define GL_TEXTURE9_ARB 0x84C9
++#define GL_TEXTURE10_ARB 0x84CA
++#define GL_TEXTURE11_ARB 0x84CB
++#define GL_TEXTURE12_ARB 0x84CC
++#define GL_TEXTURE13_ARB 0x84CD
++#define GL_TEXTURE14_ARB 0x84CE
++#define GL_TEXTURE15_ARB 0x84CF
++#define GL_TEXTURE16_ARB 0x84D0
++#define GL_TEXTURE17_ARB 0x84D1
++#define GL_TEXTURE18_ARB 0x84D2
++#define GL_TEXTURE19_ARB 0x84D3
++#define GL_TEXTURE20_ARB 0x84D4
++#define GL_TEXTURE21_ARB 0x84D5
++#define GL_TEXTURE22_ARB 0x84D6
++#define GL_TEXTURE23_ARB 0x84D7
++#define GL_TEXTURE24_ARB 0x84D8
++#define GL_TEXTURE25_ARB 0x84D9
++#define GL_TEXTURE26_ARB 0x84DA
++#define GL_TEXTURE27_ARB 0x84DB
++#define GL_TEXTURE28_ARB 0x84DC
++#define GL_TEXTURE29_ARB 0x84DD
++#define GL_TEXTURE30_ARB 0x84DE
++#define GL_TEXTURE31_ARB 0x84DF
++#define GL_ACTIVE_TEXTURE_ARB 0x84E0
++#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
++#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
++
++GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
++GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
++GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
++GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
++GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
++GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
++GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
++GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
++GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
++GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
++GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
++GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
++GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
++GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
++GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
++GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
++GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
++GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
++GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
++GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
++GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
++GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
++GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
++GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
++GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
++GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
++GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
++GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
++GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
++GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
++GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
++
++typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
++
++#endif /* GL_ARB_multitexture */
++
++
++
++/*
++ * Define this token if you want "old-style" header file behaviour (extensions
++ * defined in gl.h). Otherwise, extensions will be included from glext.h.
++ */
++#if defined(GL_GLEXT_LEGACY)
++
++/* All extensions that used to be here are now found in glext.h */
++
++#else /* GL_GLEXT_LEGACY */
++
++#include <mesa_glext.h>
++
++#endif /* GL_GLEXT_LEGACY */
++
++
++
++#if GL_ARB_shader_objects
++
++#ifndef GL_MESA_shader_debug
++#define GL_MESA_shader_debug 1
++
++#define GL_DEBUG_OBJECT_MESA 0x8759
++#define GL_DEBUG_PRINT_MESA 0x875A
++#define GL_DEBUG_ASSERT_MESA 0x875B
++
++GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
++GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
++GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
++ GLsizei *length, GLcharARB *debugLog);
++GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
++
++#endif /* GL_MESA_shader_debug */
++
++#endif /* GL_ARB_shader_objects */
++
++
++/*
++ * ???. GL_MESA_packed_depth_stencil
++ * XXX obsolete
++ */
++#ifndef GL_MESA_packed_depth_stencil
++#define GL_MESA_packed_depth_stencil 1
++
++#define GL_DEPTH_STENCIL_MESA 0x8750
++#define GL_UNSIGNED_INT_24_8_MESA 0x8751
++#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
++#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
++#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
++
++#endif /* GL_MESA_packed_depth_stencil */
++
++
++#ifndef GL_MESA_program_debug
++#define GL_MESA_program_debug 1
++
++#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
++#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
++#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
++#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
++#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
++#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
++#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
++#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
++
++typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
++
++GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
++
++GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
++
++#endif /* GL_MESA_program_debug */
++
++
++#ifndef GL_ATI_blend_equation_separate
++#define GL_ATI_blend_equation_separate 1
++
++#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
++
++GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
++typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
++
++#endif /* GL_ATI_blend_equation_separate */
++
++
++
++/**
++ ** NOTE!!!!! If you add new functions to this file, or update
++ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
++ ** in that file for details.
++ **/
++
++
++
++/**********************************************************************
++ * Begin system-specific stuff
++ */
++#if defined(PRAGMA_EXPORT_SUPPORTED)
++#pragma export off
++#endif
++
++#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
++#pragma import off
++#endif
++/*
++ * End system-specific stuff
++ **********************************************************************/
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* __gl_h_ */
+Index: trunk/target-i386/mesa_glext.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/mesa_glext.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,7279 @@
++#ifndef __glext_h_
++#define __glext_h_
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++** Copyright (c) 2007 The Khronos Group Inc.
++**
++** Permission is hereby granted, free of charge, to any person obtaining a
++** copy of this software and/or associated documentation files (the
++** "Materials"), to deal in the Materials without restriction, including
++** without limitation the rights to use, copy, modify, merge, publish,
++** distribute, sublicense, and/or sell copies of the Materials, and to
++** permit persons to whom the Materials are furnished to do so, subject to
++** the following conditions:
++**
++** The above copyright notice and this permission notice shall be included
++** in all copies or substantial portions of the Materials.
++**
++** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
++*/
++
++#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
++#define WIN32_LEAN_AND_MEAN 1
++#include <windows.h>
++#endif
++
++#ifndef APIENTRY
++#define APIENTRY
++#endif
++#ifndef APIENTRYP
++#define APIENTRYP APIENTRY *
++#endif
++#ifndef GLAPI
++#define GLAPI extern
++#endif
++
++/*************************************************************/
++
++/* Header file version number, required by OpenGL ABI for Linux */
++/* glext.h last updated 2007/02/12 */
++/* Current version at http://www.opengl.org/registry/ */
++#define GL_GLEXT_VERSION 39
++
++#ifndef GL_VERSION_1_2
++#define GL_UNSIGNED_BYTE_3_3_2 0x8032
++#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
++#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
++#define GL_UNSIGNED_INT_8_8_8_8 0x8035
++#define GL_UNSIGNED_INT_10_10_10_2 0x8036
++#define GL_RESCALE_NORMAL 0x803A
++#define GL_TEXTURE_BINDING_3D 0x806A
++#define GL_PACK_SKIP_IMAGES 0x806B
++#define GL_PACK_IMAGE_HEIGHT 0x806C
++#define GL_UNPACK_SKIP_IMAGES 0x806D
++#define GL_UNPACK_IMAGE_HEIGHT 0x806E
++#define GL_TEXTURE_3D 0x806F
++#define GL_PROXY_TEXTURE_3D 0x8070
++#define GL_TEXTURE_DEPTH 0x8071
++#define GL_TEXTURE_WRAP_R 0x8072
++#define GL_MAX_3D_TEXTURE_SIZE 0x8073
++#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
++#define GL_UNSIGNED_SHORT_5_6_5 0x8363
++#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
++#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
++#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
++#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
++#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
++#define GL_BGR 0x80E0
++#define GL_BGRA 0x80E1
++#define GL_MAX_ELEMENTS_VERTICES 0x80E8
++#define GL_MAX_ELEMENTS_INDICES 0x80E9
++#define GL_CLAMP_TO_EDGE 0x812F
++#define GL_TEXTURE_MIN_LOD 0x813A
++#define GL_TEXTURE_MAX_LOD 0x813B
++#define GL_TEXTURE_BASE_LEVEL 0x813C
++#define GL_TEXTURE_MAX_LEVEL 0x813D
++#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
++#define GL_SINGLE_COLOR 0x81F9
++#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
++#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
++#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
++#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
++#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
++#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
++#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
++#endif
++
++#ifndef GL_ARB_imaging
++#define GL_CONSTANT_COLOR 0x8001
++#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
++#define GL_CONSTANT_ALPHA 0x8003
++#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
++#define GL_BLEND_COLOR 0x8005
++#define GL_FUNC_ADD 0x8006
++#define GL_MIN 0x8007
++#define GL_MAX 0x8008
++#define GL_BLEND_EQUATION 0x8009
++#define GL_FUNC_SUBTRACT 0x800A
++#define GL_FUNC_REVERSE_SUBTRACT 0x800B
++#define GL_CONVOLUTION_1D 0x8010
++#define GL_CONVOLUTION_2D 0x8011
++#define GL_SEPARABLE_2D 0x8012
++#define GL_CONVOLUTION_BORDER_MODE 0x8013
++#define GL_CONVOLUTION_FILTER_SCALE 0x8014
++#define GL_CONVOLUTION_FILTER_BIAS 0x8015
++#define GL_REDUCE 0x8016
++#define GL_CONVOLUTION_FORMAT 0x8017
++#define GL_CONVOLUTION_WIDTH 0x8018
++#define GL_CONVOLUTION_HEIGHT 0x8019
++#define GL_MAX_CONVOLUTION_WIDTH 0x801A
++#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
++#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
++#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
++#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
++#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
++#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
++#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
++#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
++#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
++#define GL_HISTOGRAM 0x8024
++#define GL_PROXY_HISTOGRAM 0x8025
++#define GL_HISTOGRAM_WIDTH 0x8026
++#define GL_HISTOGRAM_FORMAT 0x8027
++#define GL_HISTOGRAM_RED_SIZE 0x8028
++#define GL_HISTOGRAM_GREEN_SIZE 0x8029
++#define GL_HISTOGRAM_BLUE_SIZE 0x802A
++#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
++#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
++#define GL_HISTOGRAM_SINK 0x802D
++#define GL_MINMAX 0x802E
++#define GL_MINMAX_FORMAT 0x802F
++#define GL_MINMAX_SINK 0x8030
++#define GL_TABLE_TOO_LARGE 0x8031
++#define GL_COLOR_MATRIX 0x80B1
++#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
++#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
++#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
++#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
++#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
++#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
++#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
++#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
++#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
++#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
++#define GL_COLOR_TABLE 0x80D0
++#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
++#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
++#define GL_PROXY_COLOR_TABLE 0x80D3
++#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
++#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
++#define GL_COLOR_TABLE_SCALE 0x80D6
++#define GL_COLOR_TABLE_BIAS 0x80D7
++#define GL_COLOR_TABLE_FORMAT 0x80D8
++#define GL_COLOR_TABLE_WIDTH 0x80D9
++#define GL_COLOR_TABLE_RED_SIZE 0x80DA
++#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
++#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
++#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
++#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
++#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
++#define GL_CONSTANT_BORDER 0x8151
++#define GL_REPLICATE_BORDER 0x8153
++#define GL_CONVOLUTION_BORDER_COLOR 0x8154
++#endif
++
++#ifndef GL_VERSION_1_3
++#define GL_TEXTURE0 0x84C0
++#define GL_TEXTURE1 0x84C1
++#define GL_TEXTURE2 0x84C2
++#define GL_TEXTURE3 0x84C3
++#define GL_TEXTURE4 0x84C4
++#define GL_TEXTURE5 0x84C5
++#define GL_TEXTURE6 0x84C6
++#define GL_TEXTURE7 0x84C7
++#define GL_TEXTURE8 0x84C8
++#define GL_TEXTURE9 0x84C9
++#define GL_TEXTURE10 0x84CA
++#define GL_TEXTURE11 0x84CB
++#define GL_TEXTURE12 0x84CC
++#define GL_TEXTURE13 0x84CD
++#define GL_TEXTURE14 0x84CE
++#define GL_TEXTURE15 0x84CF
++#define GL_TEXTURE16 0x84D0
++#define GL_TEXTURE17 0x84D1
++#define GL_TEXTURE18 0x84D2
++#define GL_TEXTURE19 0x84D3
++#define GL_TEXTURE20 0x84D4
++#define GL_TEXTURE21 0x84D5
++#define GL_TEXTURE22 0x84D6
++#define GL_TEXTURE23 0x84D7
++#define GL_TEXTURE24 0x84D8
++#define GL_TEXTURE25 0x84D9
++#define GL_TEXTURE26 0x84DA
++#define GL_TEXTURE27 0x84DB
++#define GL_TEXTURE28 0x84DC
++#define GL_TEXTURE29 0x84DD
++#define GL_TEXTURE30 0x84DE
++#define GL_TEXTURE31 0x84DF
++#define GL_ACTIVE_TEXTURE 0x84E0
++#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
++#define GL_MAX_TEXTURE_UNITS 0x84E2
++#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
++#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
++#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
++#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
++#define GL_MULTISAMPLE 0x809D
++#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
++#define GL_SAMPLE_COVERAGE 0x80A0
++#define GL_SAMPLE_BUFFERS 0x80A8
++#define GL_SAMPLES 0x80A9
++#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
++#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
++#define GL_MULTISAMPLE_BIT 0x20000000
++#define GL_NORMAL_MAP 0x8511
++#define GL_REFLECTION_MAP 0x8512
++#define GL_TEXTURE_CUBE_MAP 0x8513
++#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
++#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
++#define GL_COMPRESSED_ALPHA 0x84E9
++#define GL_COMPRESSED_LUMINANCE 0x84EA
++#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
++#define GL_COMPRESSED_INTENSITY 0x84EC
++#define GL_COMPRESSED_RGB 0x84ED
++#define GL_COMPRESSED_RGBA 0x84EE
++#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
++#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
++#define GL_TEXTURE_COMPRESSED 0x86A1
++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
++#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
++#define GL_CLAMP_TO_BORDER 0x812D
++#define GL_COMBINE 0x8570
++#define GL_COMBINE_RGB 0x8571
++#define GL_COMBINE_ALPHA 0x8572
++#define GL_SOURCE0_RGB 0x8580
++#define GL_SOURCE1_RGB 0x8581
++#define GL_SOURCE2_RGB 0x8582
++#define GL_SOURCE0_ALPHA 0x8588
++#define GL_SOURCE1_ALPHA 0x8589
++#define GL_SOURCE2_ALPHA 0x858A
++#define GL_OPERAND0_RGB 0x8590
++#define GL_OPERAND1_RGB 0x8591
++#define GL_OPERAND2_RGB 0x8592
++#define GL_OPERAND0_ALPHA 0x8598
++#define GL_OPERAND1_ALPHA 0x8599
++#define GL_OPERAND2_ALPHA 0x859A
++#define GL_RGB_SCALE 0x8573
++#define GL_ADD_SIGNED 0x8574
++#define GL_INTERPOLATE 0x8575
++#define GL_SUBTRACT 0x84E7
++#define GL_CONSTANT 0x8576
++#define GL_PRIMARY_COLOR 0x8577
++#define GL_PREVIOUS 0x8578
++#define GL_DOT3_RGB 0x86AE
++#define GL_DOT3_RGBA 0x86AF
++#endif
++
++#ifndef GL_VERSION_1_4
++#define GL_BLEND_DST_RGB 0x80C8
++#define GL_BLEND_SRC_RGB 0x80C9
++#define GL_BLEND_DST_ALPHA 0x80CA
++#define GL_BLEND_SRC_ALPHA 0x80CB
++#define GL_POINT_SIZE_MIN 0x8126
++#define GL_POINT_SIZE_MAX 0x8127
++#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
++#define GL_POINT_DISTANCE_ATTENUATION 0x8129
++#define GL_GENERATE_MIPMAP 0x8191
++#define GL_GENERATE_MIPMAP_HINT 0x8192
++#define GL_DEPTH_COMPONENT16 0x81A5
++#define GL_DEPTH_COMPONENT24 0x81A6
++#define GL_DEPTH_COMPONENT32 0x81A7
++#define GL_MIRRORED_REPEAT 0x8370
++#define GL_FOG_COORDINATE_SOURCE 0x8450
++#define GL_FOG_COORDINATE 0x8451
++#define GL_FRAGMENT_DEPTH 0x8452
++#define GL_CURRENT_FOG_COORDINATE 0x8453
++#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
++#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
++#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
++#define GL_FOG_COORDINATE_ARRAY 0x8457
++#define GL_COLOR_SUM 0x8458
++#define GL_CURRENT_SECONDARY_COLOR 0x8459
++#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
++#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
++#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
++#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
++#define GL_SECONDARY_COLOR_ARRAY 0x845E
++#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
++#define GL_TEXTURE_FILTER_CONTROL 0x8500
++#define GL_TEXTURE_LOD_BIAS 0x8501
++#define GL_INCR_WRAP 0x8507
++#define GL_DECR_WRAP 0x8508
++#define GL_TEXTURE_DEPTH_SIZE 0x884A
++#define GL_DEPTH_TEXTURE_MODE 0x884B
++#define GL_TEXTURE_COMPARE_MODE 0x884C
++#define GL_TEXTURE_COMPARE_FUNC 0x884D
++#define GL_COMPARE_R_TO_TEXTURE 0x884E
++#endif
++
++#ifndef GL_VERSION_1_5
++#define GL_BUFFER_SIZE 0x8764
++#define GL_BUFFER_USAGE 0x8765
++#define GL_QUERY_COUNTER_BITS 0x8864
++#define GL_CURRENT_QUERY 0x8865
++#define GL_QUERY_RESULT 0x8866
++#define GL_QUERY_RESULT_AVAILABLE 0x8867
++#define GL_ARRAY_BUFFER 0x8892
++#define GL_ELEMENT_ARRAY_BUFFER 0x8893
++#define GL_ARRAY_BUFFER_BINDING 0x8894
++#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
++#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
++#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
++#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
++#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
++#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
++#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
++#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
++#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
++#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
++#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
++#define GL_READ_ONLY 0x88B8
++#define GL_WRITE_ONLY 0x88B9
++#define GL_READ_WRITE 0x88BA
++#define GL_BUFFER_ACCESS 0x88BB
++#define GL_BUFFER_MAPPED 0x88BC
++#define GL_BUFFER_MAP_POINTER 0x88BD
++#define GL_STREAM_DRAW 0x88E0
++#define GL_STREAM_READ 0x88E1
++#define GL_STREAM_COPY 0x88E2
++#define GL_STATIC_DRAW 0x88E4
++#define GL_STATIC_READ 0x88E5
++#define GL_STATIC_COPY 0x88E6
++#define GL_DYNAMIC_DRAW 0x88E8
++#define GL_DYNAMIC_READ 0x88E9
++#define GL_DYNAMIC_COPY 0x88EA
++#define GL_SAMPLES_PASSED 0x8914
++#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
++#define GL_FOG_COORD GL_FOG_COORDINATE
++#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
++#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
++#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
++#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
++#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
++#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
++#define GL_SRC0_RGB GL_SOURCE0_RGB
++#define GL_SRC1_RGB GL_SOURCE1_RGB
++#define GL_SRC2_RGB GL_SOURCE2_RGB
++#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
++#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
++#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
++#endif
++
++#ifndef GL_VERSION_2_0
++#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
++#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
++#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
++#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
++#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
++#define GL_CURRENT_VERTEX_ATTRIB 0x8626
++#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
++#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
++#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
++#define GL_STENCIL_BACK_FUNC 0x8800
++#define GL_STENCIL_BACK_FAIL 0x8801
++#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
++#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
++#define GL_MAX_DRAW_BUFFERS 0x8824
++#define GL_DRAW_BUFFER0 0x8825
++#define GL_DRAW_BUFFER1 0x8826
++#define GL_DRAW_BUFFER2 0x8827
++#define GL_DRAW_BUFFER3 0x8828
++#define GL_DRAW_BUFFER4 0x8829
++#define GL_DRAW_BUFFER5 0x882A
++#define GL_DRAW_BUFFER6 0x882B
++#define GL_DRAW_BUFFER7 0x882C
++#define GL_DRAW_BUFFER8 0x882D
++#define GL_DRAW_BUFFER9 0x882E
++#define GL_DRAW_BUFFER10 0x882F
++#define GL_DRAW_BUFFER11 0x8830
++#define GL_DRAW_BUFFER12 0x8831
++#define GL_DRAW_BUFFER13 0x8832
++#define GL_DRAW_BUFFER14 0x8833
++#define GL_DRAW_BUFFER15 0x8834
++#define GL_BLEND_EQUATION_ALPHA 0x883D
++#define GL_POINT_SPRITE 0x8861
++#define GL_COORD_REPLACE 0x8862
++#define GL_MAX_VERTEX_ATTRIBS 0x8869
++#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
++#define GL_MAX_TEXTURE_COORDS 0x8871
++#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
++#define GL_FRAGMENT_SHADER 0x8B30
++#define GL_VERTEX_SHADER 0x8B31
++#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
++#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
++#define GL_MAX_VARYING_FLOATS 0x8B4B
++#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
++#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
++#define GL_SHADER_TYPE 0x8B4F
++#define GL_FLOAT_VEC2 0x8B50
++#define GL_FLOAT_VEC3 0x8B51
++#define GL_FLOAT_VEC4 0x8B52
++#define GL_INT_VEC2 0x8B53
++#define GL_INT_VEC3 0x8B54
++#define GL_INT_VEC4 0x8B55
++#define GL_BOOL 0x8B56
++#define GL_BOOL_VEC2 0x8B57
++#define GL_BOOL_VEC3 0x8B58
++#define GL_BOOL_VEC4 0x8B59
++#define GL_FLOAT_MAT2 0x8B5A
++#define GL_FLOAT_MAT3 0x8B5B
++#define GL_FLOAT_MAT4 0x8B5C
++#define GL_SAMPLER_1D 0x8B5D
++#define GL_SAMPLER_2D 0x8B5E
++#define GL_SAMPLER_3D 0x8B5F
++#define GL_SAMPLER_CUBE 0x8B60
++#define GL_SAMPLER_1D_SHADOW 0x8B61
++#define GL_SAMPLER_2D_SHADOW 0x8B62
++#define GL_DELETE_STATUS 0x8B80
++#define GL_COMPILE_STATUS 0x8B81
++#define GL_LINK_STATUS 0x8B82
++#define GL_VALIDATE_STATUS 0x8B83
++#define GL_INFO_LOG_LENGTH 0x8B84
++#define GL_ATTACHED_SHADERS 0x8B85
++#define GL_ACTIVE_UNIFORMS 0x8B86
++#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
++#define GL_SHADER_SOURCE_LENGTH 0x8B88
++#define GL_ACTIVE_ATTRIBUTES 0x8B89
++#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
++#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
++#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
++#define GL_CURRENT_PROGRAM 0x8B8D
++#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
++#define GL_LOWER_LEFT 0x8CA1
++#define GL_UPPER_LEFT 0x8CA2
++#define GL_STENCIL_BACK_REF 0x8CA3
++#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
++#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
++#endif
++
++#ifndef GL_VERSION_2_1
++#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
++#define GL_PIXEL_PACK_BUFFER 0x88EB
++#define GL_PIXEL_UNPACK_BUFFER 0x88EC
++#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
++#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
++#define GL_FLOAT_MAT2x3 0x8B65
++#define GL_FLOAT_MAT2x4 0x8B66
++#define GL_FLOAT_MAT3x2 0x8B67
++#define GL_FLOAT_MAT3x4 0x8B68
++#define GL_FLOAT_MAT4x2 0x8B69
++#define GL_FLOAT_MAT4x3 0x8B6A
++#define GL_SRGB 0x8C40
++#define GL_SRGB8 0x8C41
++#define GL_SRGB_ALPHA 0x8C42
++#define GL_SRGB8_ALPHA8 0x8C43
++#define GL_SLUMINANCE_ALPHA 0x8C44
++#define GL_SLUMINANCE8_ALPHA8 0x8C45
++#define GL_SLUMINANCE 0x8C46
++#define GL_SLUMINANCE8 0x8C47
++#define GL_COMPRESSED_SRGB 0x8C48
++#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
++#define GL_COMPRESSED_SLUMINANCE 0x8C4A
++#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
++#endif
++
++#ifndef GL_ARB_multitexture
++#define GL_TEXTURE0_ARB 0x84C0
++#define GL_TEXTURE1_ARB 0x84C1
++#define GL_TEXTURE2_ARB 0x84C2
++#define GL_TEXTURE3_ARB 0x84C3
++#define GL_TEXTURE4_ARB 0x84C4
++#define GL_TEXTURE5_ARB 0x84C5
++#define GL_TEXTURE6_ARB 0x84C6
++#define GL_TEXTURE7_ARB 0x84C7
++#define GL_TEXTURE8_ARB 0x84C8
++#define GL_TEXTURE9_ARB 0x84C9
++#define GL_TEXTURE10_ARB 0x84CA
++#define GL_TEXTURE11_ARB 0x84CB
++#define GL_TEXTURE12_ARB 0x84CC
++#define GL_TEXTURE13_ARB 0x84CD
++#define GL_TEXTURE14_ARB 0x84CE
++#define GL_TEXTURE15_ARB 0x84CF
++#define GL_TEXTURE16_ARB 0x84D0
++#define GL_TEXTURE17_ARB 0x84D1
++#define GL_TEXTURE18_ARB 0x84D2
++#define GL_TEXTURE19_ARB 0x84D3
++#define GL_TEXTURE20_ARB 0x84D4
++#define GL_TEXTURE21_ARB 0x84D5
++#define GL_TEXTURE22_ARB 0x84D6
++#define GL_TEXTURE23_ARB 0x84D7
++#define GL_TEXTURE24_ARB 0x84D8
++#define GL_TEXTURE25_ARB 0x84D9
++#define GL_TEXTURE26_ARB 0x84DA
++#define GL_TEXTURE27_ARB 0x84DB
++#define GL_TEXTURE28_ARB 0x84DC
++#define GL_TEXTURE29_ARB 0x84DD
++#define GL_TEXTURE30_ARB 0x84DE
++#define GL_TEXTURE31_ARB 0x84DF
++#define GL_ACTIVE_TEXTURE_ARB 0x84E0
++#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
++#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
++#endif
++
++#ifndef GL_ARB_transpose_matrix
++#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
++#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
++#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
++#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
++#endif
++
++#ifndef GL_ARB_multisample
++#define GL_MULTISAMPLE_ARB 0x809D
++#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
++#define GL_SAMPLE_COVERAGE_ARB 0x80A0
++#define GL_SAMPLE_BUFFERS_ARB 0x80A8
++#define GL_SAMPLES_ARB 0x80A9
++#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
++#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
++#define GL_MULTISAMPLE_BIT_ARB 0x20000000
++#endif
++
++#ifndef GL_ARB_texture_env_add
++#endif
++
++#ifndef GL_ARB_texture_cube_map
++#define GL_NORMAL_MAP_ARB 0x8511
++#define GL_REFLECTION_MAP_ARB 0x8512
++#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
++#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
++#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
++#endif
++
++#ifndef GL_ARB_texture_compression
++#define GL_COMPRESSED_ALPHA_ARB 0x84E9
++#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
++#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
++#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
++#define GL_COMPRESSED_RGB_ARB 0x84ED
++#define GL_COMPRESSED_RGBA_ARB 0x84EE
++#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
++#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
++#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
++#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
++#endif
++
++#ifndef GL_ARB_texture_border_clamp
++#define GL_CLAMP_TO_BORDER_ARB 0x812D
++#endif
++
++#ifndef GL_ARB_point_parameters
++#define GL_POINT_SIZE_MIN_ARB 0x8126
++#define GL_POINT_SIZE_MAX_ARB 0x8127
++#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
++#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
++#endif
++
++#ifndef GL_ARB_vertex_blend
++#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
++#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
++#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
++#define GL_VERTEX_BLEND_ARB 0x86A7
++#define GL_CURRENT_WEIGHT_ARB 0x86A8
++#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
++#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
++#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
++#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
++#define GL_WEIGHT_ARRAY_ARB 0x86AD
++#define GL_MODELVIEW0_ARB 0x1700
++#define GL_MODELVIEW1_ARB 0x850A
++#define GL_MODELVIEW2_ARB 0x8722
++#define GL_MODELVIEW3_ARB 0x8723
++#define GL_MODELVIEW4_ARB 0x8724
++#define GL_MODELVIEW5_ARB 0x8725
++#define GL_MODELVIEW6_ARB 0x8726
++#define GL_MODELVIEW7_ARB 0x8727
++#define GL_MODELVIEW8_ARB 0x8728
++#define GL_MODELVIEW9_ARB 0x8729
++#define GL_MODELVIEW10_ARB 0x872A
++#define GL_MODELVIEW11_ARB 0x872B
++#define GL_MODELVIEW12_ARB 0x872C
++#define GL_MODELVIEW13_ARB 0x872D
++#define GL_MODELVIEW14_ARB 0x872E
++#define GL_MODELVIEW15_ARB 0x872F
++#define GL_MODELVIEW16_ARB 0x8730
++#define GL_MODELVIEW17_ARB 0x8731
++#define GL_MODELVIEW18_ARB 0x8732
++#define GL_MODELVIEW19_ARB 0x8733
++#define GL_MODELVIEW20_ARB 0x8734
++#define GL_MODELVIEW21_ARB 0x8735
++#define GL_MODELVIEW22_ARB 0x8736
++#define GL_MODELVIEW23_ARB 0x8737
++#define GL_MODELVIEW24_ARB 0x8738
++#define GL_MODELVIEW25_ARB 0x8739
++#define GL_MODELVIEW26_ARB 0x873A
++#define GL_MODELVIEW27_ARB 0x873B
++#define GL_MODELVIEW28_ARB 0x873C
++#define GL_MODELVIEW29_ARB 0x873D
++#define GL_MODELVIEW30_ARB 0x873E
++#define GL_MODELVIEW31_ARB 0x873F
++#endif
++
++#ifndef GL_ARB_matrix_palette
++#define GL_MATRIX_PALETTE_ARB 0x8840
++#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
++#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
++#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
++#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
++#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
++#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
++#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
++#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
++#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
++#endif
++
++#ifndef GL_ARB_texture_env_combine
++#define GL_COMBINE_ARB 0x8570
++#define GL_COMBINE_RGB_ARB 0x8571
++#define GL_COMBINE_ALPHA_ARB 0x8572
++#define GL_SOURCE0_RGB_ARB 0x8580
++#define GL_SOURCE1_RGB_ARB 0x8581
++#define GL_SOURCE2_RGB_ARB 0x8582
++#define GL_SOURCE0_ALPHA_ARB 0x8588
++#define GL_SOURCE1_ALPHA_ARB 0x8589
++#define GL_SOURCE2_ALPHA_ARB 0x858A
++#define GL_OPERAND0_RGB_ARB 0x8590
++#define GL_OPERAND1_RGB_ARB 0x8591
++#define GL_OPERAND2_RGB_ARB 0x8592
++#define GL_OPERAND0_ALPHA_ARB 0x8598
++#define GL_OPERAND1_ALPHA_ARB 0x8599
++#define GL_OPERAND2_ALPHA_ARB 0x859A
++#define GL_RGB_SCALE_ARB 0x8573
++#define GL_ADD_SIGNED_ARB 0x8574
++#define GL_INTERPOLATE_ARB 0x8575
++#define GL_SUBTRACT_ARB 0x84E7
++#define GL_CONSTANT_ARB 0x8576
++#define GL_PRIMARY_COLOR_ARB 0x8577
++#define GL_PREVIOUS_ARB 0x8578
++#endif
++
++#ifndef GL_ARB_texture_env_crossbar
++#endif
++
++#ifndef GL_ARB_texture_env_dot3
++#define GL_DOT3_RGB_ARB 0x86AE
++#define GL_DOT3_RGBA_ARB 0x86AF
++#endif
++
++#ifndef GL_ARB_texture_mirrored_repeat
++#define GL_MIRRORED_REPEAT_ARB 0x8370
++#endif
++
++#ifndef GL_ARB_depth_texture
++#define GL_DEPTH_COMPONENT16_ARB 0x81A5
++#define GL_DEPTH_COMPONENT24_ARB 0x81A6
++#define GL_DEPTH_COMPONENT32_ARB 0x81A7
++#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
++#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
++#endif
++
++#ifndef GL_ARB_shadow
++#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
++#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
++#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
++#endif
++
++#ifndef GL_ARB_shadow_ambient
++#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
++#endif
++
++#ifndef GL_ARB_window_pos
++#endif
++
++#ifndef GL_ARB_vertex_program
++#define GL_COLOR_SUM_ARB 0x8458
++#define GL_VERTEX_PROGRAM_ARB 0x8620
++#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
++#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
++#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
++#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
++#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
++#define GL_PROGRAM_LENGTH_ARB 0x8627
++#define GL_PROGRAM_STRING_ARB 0x8628
++#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
++#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
++#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
++#define GL_CURRENT_MATRIX_ARB 0x8641
++#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
++#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
++#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
++#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
++#define GL_PROGRAM_BINDING_ARB 0x8677
++#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
++#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
++#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
++#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
++#define GL_PROGRAM_FORMAT_ARB 0x8876
++#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
++#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
++#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
++#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
++#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
++#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
++#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
++#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
++#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
++#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
++#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
++#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
++#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
++#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
++#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
++#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
++#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
++#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
++#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
++#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
++#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
++#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
++#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
++#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
++#define GL_MATRIX0_ARB 0x88C0
++#define GL_MATRIX1_ARB 0x88C1
++#define GL_MATRIX2_ARB 0x88C2
++#define GL_MATRIX3_ARB 0x88C3
++#define GL_MATRIX4_ARB 0x88C4
++#define GL_MATRIX5_ARB 0x88C5
++#define GL_MATRIX6_ARB 0x88C6
++#define GL_MATRIX7_ARB 0x88C7
++#define GL_MATRIX8_ARB 0x88C8
++#define GL_MATRIX9_ARB 0x88C9
++#define GL_MATRIX10_ARB 0x88CA
++#define GL_MATRIX11_ARB 0x88CB
++#define GL_MATRIX12_ARB 0x88CC
++#define GL_MATRIX13_ARB 0x88CD
++#define GL_MATRIX14_ARB 0x88CE
++#define GL_MATRIX15_ARB 0x88CF
++#define GL_MATRIX16_ARB 0x88D0
++#define GL_MATRIX17_ARB 0x88D1
++#define GL_MATRIX18_ARB 0x88D2
++#define GL_MATRIX19_ARB 0x88D3
++#define GL_MATRIX20_ARB 0x88D4
++#define GL_MATRIX21_ARB 0x88D5
++#define GL_MATRIX22_ARB 0x88D6
++#define GL_MATRIX23_ARB 0x88D7
++#define GL_MATRIX24_ARB 0x88D8
++#define GL_MATRIX25_ARB 0x88D9
++#define GL_MATRIX26_ARB 0x88DA
++#define GL_MATRIX27_ARB 0x88DB
++#define GL_MATRIX28_ARB 0x88DC
++#define GL_MATRIX29_ARB 0x88DD
++#define GL_MATRIX30_ARB 0x88DE
++#define GL_MATRIX31_ARB 0x88DF
++#endif
++
++#ifndef GL_ARB_fragment_program
++#define GL_FRAGMENT_PROGRAM_ARB 0x8804
++#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
++#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
++#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
++#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
++#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
++#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
++#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
++#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
++#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
++#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
++#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
++#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
++#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
++#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
++#endif
++
++#ifndef GL_ARB_vertex_buffer_object
++#define GL_BUFFER_SIZE_ARB 0x8764
++#define GL_BUFFER_USAGE_ARB 0x8765
++#define GL_ARRAY_BUFFER_ARB 0x8892
++#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
++#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
++#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
++#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
++#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
++#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
++#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
++#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
++#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
++#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
++#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
++#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
++#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
++#define GL_READ_ONLY_ARB 0x88B8
++#define GL_WRITE_ONLY_ARB 0x88B9
++#define GL_READ_WRITE_ARB 0x88BA
++#define GL_BUFFER_ACCESS_ARB 0x88BB
++#define GL_BUFFER_MAPPED_ARB 0x88BC
++#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
++#define GL_STREAM_DRAW_ARB 0x88E0
++#define GL_STREAM_READ_ARB 0x88E1
++#define GL_STREAM_COPY_ARB 0x88E2
++#define GL_STATIC_DRAW_ARB 0x88E4
++#define GL_STATIC_READ_ARB 0x88E5
++#define GL_STATIC_COPY_ARB 0x88E6
++#define GL_DYNAMIC_DRAW_ARB 0x88E8
++#define GL_DYNAMIC_READ_ARB 0x88E9
++#define GL_DYNAMIC_COPY_ARB 0x88EA
++#endif
++
++#ifndef GL_ARB_occlusion_query
++#define GL_QUERY_COUNTER_BITS_ARB 0x8864
++#define GL_CURRENT_QUERY_ARB 0x8865
++#define GL_QUERY_RESULT_ARB 0x8866
++#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
++#define GL_SAMPLES_PASSED_ARB 0x8914
++#endif
++
++#ifndef GL_ARB_shader_objects
++#define GL_PROGRAM_OBJECT_ARB 0x8B40
++#define GL_SHADER_OBJECT_ARB 0x8B48
++#define GL_OBJECT_TYPE_ARB 0x8B4E
++#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
++#define GL_FLOAT_VEC2_ARB 0x8B50
++#define GL_FLOAT_VEC3_ARB 0x8B51
++#define GL_FLOAT_VEC4_ARB 0x8B52
++#define GL_INT_VEC2_ARB 0x8B53
++#define GL_INT_VEC3_ARB 0x8B54
++#define GL_INT_VEC4_ARB 0x8B55
++#define GL_BOOL_ARB 0x8B56
++#define GL_BOOL_VEC2_ARB 0x8B57
++#define GL_BOOL_VEC3_ARB 0x8B58
++#define GL_BOOL_VEC4_ARB 0x8B59
++#define GL_FLOAT_MAT2_ARB 0x8B5A
++#define GL_FLOAT_MAT3_ARB 0x8B5B
++#define GL_FLOAT_MAT4_ARB 0x8B5C
++#define GL_SAMPLER_1D_ARB 0x8B5D
++#define GL_SAMPLER_2D_ARB 0x8B5E
++#define GL_SAMPLER_3D_ARB 0x8B5F
++#define GL_SAMPLER_CUBE_ARB 0x8B60
++#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
++#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
++#define GL_SAMPLER_2D_RECT_ARB 0x8B63
++#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
++#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
++#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
++#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
++#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
++#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
++#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
++#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
++#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
++#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
++#endif
++
++#ifndef GL_ARB_vertex_shader
++#define GL_VERTEX_SHADER_ARB 0x8B31
++#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
++#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
++#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
++#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
++#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
++#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
++#endif
++
++#ifndef GL_ARB_fragment_shader
++#define GL_FRAGMENT_SHADER_ARB 0x8B30
++#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
++#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
++#endif
++
++#ifndef GL_ARB_shading_language_100
++#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
++#endif
++
++#ifndef GL_ARB_texture_non_power_of_two
++#endif
++
++#ifndef GL_ARB_point_sprite
++#define GL_POINT_SPRITE_ARB 0x8861
++#define GL_COORD_REPLACE_ARB 0x8862
++#endif
++
++#ifndef GL_ARB_fragment_program_shadow
++#endif
++
++#ifndef GL_ARB_draw_buffers
++#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
++#define GL_DRAW_BUFFER0_ARB 0x8825
++#define GL_DRAW_BUFFER1_ARB 0x8826
++#define GL_DRAW_BUFFER2_ARB 0x8827
++#define GL_DRAW_BUFFER3_ARB 0x8828
++#define GL_DRAW_BUFFER4_ARB 0x8829
++#define GL_DRAW_BUFFER5_ARB 0x882A
++#define GL_DRAW_BUFFER6_ARB 0x882B
++#define GL_DRAW_BUFFER7_ARB 0x882C
++#define GL_DRAW_BUFFER8_ARB 0x882D
++#define GL_DRAW_BUFFER9_ARB 0x882E
++#define GL_DRAW_BUFFER10_ARB 0x882F
++#define GL_DRAW_BUFFER11_ARB 0x8830
++#define GL_DRAW_BUFFER12_ARB 0x8831
++#define GL_DRAW_BUFFER13_ARB 0x8832
++#define GL_DRAW_BUFFER14_ARB 0x8833
++#define GL_DRAW_BUFFER15_ARB 0x8834
++#endif
++
++#ifndef GL_ARB_texture_rectangle
++#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
++#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
++#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
++#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
++#endif
++
++#ifndef GL_ARB_color_buffer_float
++#define GL_RGBA_FLOAT_MODE_ARB 0x8820
++#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
++#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
++#define GL_CLAMP_READ_COLOR_ARB 0x891C
++#define GL_FIXED_ONLY_ARB 0x891D
++#endif
++
++#ifndef GL_ARB_half_float_pixel
++#define GL_HALF_FLOAT_ARB 0x140B
++#endif
++
++#ifndef GL_ARB_texture_float
++#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
++#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
++#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
++#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
++#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
++#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
++#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
++#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
++#define GL_RGBA32F_ARB 0x8814
++#define GL_RGB32F_ARB 0x8815
++#define GL_ALPHA32F_ARB 0x8816
++#define GL_INTENSITY32F_ARB 0x8817
++#define GL_LUMINANCE32F_ARB 0x8818
++#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
++#define GL_RGBA16F_ARB 0x881A
++#define GL_RGB16F_ARB 0x881B
++#define GL_ALPHA16F_ARB 0x881C
++#define GL_INTENSITY16F_ARB 0x881D
++#define GL_LUMINANCE16F_ARB 0x881E
++#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
++#endif
++
++#ifndef GL_ARB_pixel_buffer_object
++#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
++#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
++#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
++#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
++#endif
++
++#ifndef GL_EXT_abgr
++#define GL_ABGR_EXT 0x8000
++#endif
++
++#ifndef GL_EXT_blend_color
++#define GL_CONSTANT_COLOR_EXT 0x8001
++#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
++#define GL_CONSTANT_ALPHA_EXT 0x8003
++#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
++#define GL_BLEND_COLOR_EXT 0x8005
++#endif
++
++#ifndef GL_EXT_polygon_offset
++#define GL_POLYGON_OFFSET_EXT 0x8037
++#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
++#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
++#endif
++
++#ifndef GL_EXT_texture
++#define GL_ALPHA4_EXT 0x803B
++#define GL_ALPHA8_EXT 0x803C
++#define GL_ALPHA12_EXT 0x803D
++#define GL_ALPHA16_EXT 0x803E
++#define GL_LUMINANCE4_EXT 0x803F
++#define GL_LUMINANCE8_EXT 0x8040
++#define GL_LUMINANCE12_EXT 0x8041
++#define GL_LUMINANCE16_EXT 0x8042
++#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
++#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
++#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
++#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
++#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
++#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
++#define GL_INTENSITY_EXT 0x8049
++#define GL_INTENSITY4_EXT 0x804A
++#define GL_INTENSITY8_EXT 0x804B
++#define GL_INTENSITY12_EXT 0x804C
++#define GL_INTENSITY16_EXT 0x804D
++#define GL_RGB2_EXT 0x804E
++#define GL_RGB4_EXT 0x804F
++#define GL_RGB5_EXT 0x8050
++#define GL_RGB8_EXT 0x8051
++#define GL_RGB10_EXT 0x8052
++#define GL_RGB12_EXT 0x8053
++#define GL_RGB16_EXT 0x8054
++#define GL_RGBA2_EXT 0x8055
++#define GL_RGBA4_EXT 0x8056
++#define GL_RGB5_A1_EXT 0x8057
++#define GL_RGBA8_EXT 0x8058
++#define GL_RGB10_A2_EXT 0x8059
++#define GL_RGBA12_EXT 0x805A
++#define GL_RGBA16_EXT 0x805B
++#define GL_TEXTURE_RED_SIZE_EXT 0x805C
++#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
++#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
++#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
++#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
++#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
++#define GL_REPLACE_EXT 0x8062
++#define GL_PROXY_TEXTURE_1D_EXT 0x8063
++#define GL_PROXY_TEXTURE_2D_EXT 0x8064
++#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
++#endif
++
++#ifndef GL_EXT_texture3D
++#define GL_PACK_SKIP_IMAGES_EXT 0x806B
++#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
++#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
++#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
++#define GL_TEXTURE_3D_EXT 0x806F
++#define GL_PROXY_TEXTURE_3D_EXT 0x8070
++#define GL_TEXTURE_DEPTH_EXT 0x8071
++#define GL_TEXTURE_WRAP_R_EXT 0x8072
++#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
++#endif
++
++#ifndef GL_SGIS_texture_filter4
++#define GL_FILTER4_SGIS 0x8146
++#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
++#endif
++
++#ifndef GL_EXT_subtexture
++#endif
++
++#ifndef GL_EXT_copy_texture
++#endif
++
++#ifndef GL_EXT_histogram
++#define GL_HISTOGRAM_EXT 0x8024
++#define GL_PROXY_HISTOGRAM_EXT 0x8025
++#define GL_HISTOGRAM_WIDTH_EXT 0x8026
++#define GL_HISTOGRAM_FORMAT_EXT 0x8027
++#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
++#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
++#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
++#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
++#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
++#define GL_HISTOGRAM_SINK_EXT 0x802D
++#define GL_MINMAX_EXT 0x802E
++#define GL_MINMAX_FORMAT_EXT 0x802F
++#define GL_MINMAX_SINK_EXT 0x8030
++#define GL_TABLE_TOO_LARGE_EXT 0x8031
++#endif
++
++#ifndef GL_EXT_convolution
++#define GL_CONVOLUTION_1D_EXT 0x8010
++#define GL_CONVOLUTION_2D_EXT 0x8011
++#define GL_SEPARABLE_2D_EXT 0x8012
++#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
++#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
++#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
++#define GL_REDUCE_EXT 0x8016
++#define GL_CONVOLUTION_FORMAT_EXT 0x8017
++#define GL_CONVOLUTION_WIDTH_EXT 0x8018
++#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
++#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
++#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
++#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
++#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
++#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
++#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
++#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
++#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
++#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
++#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
++#endif
++
++#ifndef GL_SGI_color_matrix
++#define GL_COLOR_MATRIX_SGI 0x80B1
++#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
++#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
++#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
++#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
++#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
++#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
++#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
++#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
++#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
++#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
++#endif
++
++#ifndef GL_SGI_color_table
++#define GL_COLOR_TABLE_SGI 0x80D0
++#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
++#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
++#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
++#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
++#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
++#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
++#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
++#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
++#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
++#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
++#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
++#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
++#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
++#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
++#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
++#endif
++
++#ifndef GL_SGIS_pixel_texture
++#define GL_PIXEL_TEXTURE_SGIS 0x8353
++#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
++#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
++#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
++#endif
++
++#ifndef GL_SGIX_pixel_texture
++#define GL_PIXEL_TEX_GEN_SGIX 0x8139
++#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
++#endif
++
++#ifndef GL_SGIS_texture4D
++#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
++#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
++#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
++#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
++#define GL_TEXTURE_4D_SGIS 0x8134
++#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
++#define GL_TEXTURE_4DSIZE_SGIS 0x8136
++#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
++#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
++#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
++#endif
++
++#ifndef GL_SGI_texture_color_table
++#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
++#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
++#endif
++
++#ifndef GL_EXT_cmyka
++#define GL_CMYK_EXT 0x800C
++#define GL_CMYKA_EXT 0x800D
++#define GL_PACK_CMYK_HINT_EXT 0x800E
++#define GL_UNPACK_CMYK_HINT_EXT 0x800F
++#endif
++
++#ifndef GL_EXT_texture_object
++#define GL_TEXTURE_PRIORITY_EXT 0x8066
++#define GL_TEXTURE_RESIDENT_EXT 0x8067
++#define GL_TEXTURE_1D_BINDING_EXT 0x8068
++#define GL_TEXTURE_2D_BINDING_EXT 0x8069
++#define GL_TEXTURE_3D_BINDING_EXT 0x806A
++#endif
++
++#ifndef GL_SGIS_detail_texture
++#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
++#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
++#define GL_LINEAR_DETAIL_SGIS 0x8097
++#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
++#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
++#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
++#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
++#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
++#endif
++
++#ifndef GL_SGIS_sharpen_texture
++#define GL_LINEAR_SHARPEN_SGIS 0x80AD
++#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
++#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
++#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
++#endif
++
++#ifndef GL_EXT_packed_pixels
++#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
++#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
++#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
++#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
++#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
++#endif
++
++#ifndef GL_SGIS_texture_lod
++#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
++#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
++#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
++#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
++#endif
++
++#ifndef GL_SGIS_multisample
++#define GL_MULTISAMPLE_SGIS 0x809D
++#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
++#define GL_SAMPLE_MASK_SGIS 0x80A0
++#define GL_1PASS_SGIS 0x80A1
++#define GL_2PASS_0_SGIS 0x80A2
++#define GL_2PASS_1_SGIS 0x80A3
++#define GL_4PASS_0_SGIS 0x80A4
++#define GL_4PASS_1_SGIS 0x80A5
++#define GL_4PASS_2_SGIS 0x80A6
++#define GL_4PASS_3_SGIS 0x80A7
++#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
++#define GL_SAMPLES_SGIS 0x80A9
++#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
++#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
++#define GL_SAMPLE_PATTERN_SGIS 0x80AC
++#endif
++
++#ifndef GL_EXT_rescale_normal
++#define GL_RESCALE_NORMAL_EXT 0x803A
++#endif
++
++#ifndef GL_EXT_vertex_array
++#define GL_VERTEX_ARRAY_EXT 0x8074
++#define GL_NORMAL_ARRAY_EXT 0x8075
++#define GL_COLOR_ARRAY_EXT 0x8076
++#define GL_INDEX_ARRAY_EXT 0x8077
++#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
++#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
++#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
++#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
++#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
++#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
++#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
++#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
++#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
++#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
++#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
++#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
++#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
++#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
++#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
++#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
++#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
++#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
++#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
++#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
++#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
++#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
++#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
++#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
++#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
++#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
++#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
++#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
++#endif
++
++#ifndef GL_EXT_misc_attribute
++#endif
++
++#ifndef GL_SGIS_generate_mipmap
++#define GL_GENERATE_MIPMAP_SGIS 0x8191
++#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
++#endif
++
++#ifndef GL_SGIX_clipmap
++#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
++#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
++#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
++#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
++#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
++#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
++#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
++#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
++#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
++#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
++#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
++#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
++#endif
++
++#ifndef GL_SGIX_shadow
++#define GL_TEXTURE_COMPARE_SGIX 0x819A
++#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
++#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
++#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
++#endif
++
++#ifndef GL_SGIS_texture_edge_clamp
++#define GL_CLAMP_TO_EDGE_SGIS 0x812F
++#endif
++
++#ifndef GL_SGIS_texture_border_clamp
++#define GL_CLAMP_TO_BORDER_SGIS 0x812D
++#endif
++
++#ifndef GL_EXT_blend_minmax
++#define GL_FUNC_ADD_EXT 0x8006
++#define GL_MIN_EXT 0x8007
++#define GL_MAX_EXT 0x8008
++#define GL_BLEND_EQUATION_EXT 0x8009
++#endif
++
++#ifndef GL_EXT_blend_subtract
++#define GL_FUNC_SUBTRACT_EXT 0x800A
++#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
++#endif
++
++#ifndef GL_EXT_blend_logic_op
++#endif
++
++#ifndef GL_SGIX_interlace
++#define GL_INTERLACE_SGIX 0x8094
++#endif
++
++#ifndef GL_SGIX_pixel_tiles
++#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
++#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
++#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
++#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
++#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
++#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
++#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
++#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
++#endif
++
++#ifndef GL_SGIS_texture_select
++#define GL_DUAL_ALPHA4_SGIS 0x8110
++#define GL_DUAL_ALPHA8_SGIS 0x8111
++#define GL_DUAL_ALPHA12_SGIS 0x8112
++#define GL_DUAL_ALPHA16_SGIS 0x8113
++#define GL_DUAL_LUMINANCE4_SGIS 0x8114
++#define GL_DUAL_LUMINANCE8_SGIS 0x8115
++#define GL_DUAL_LUMINANCE12_SGIS 0x8116
++#define GL_DUAL_LUMINANCE16_SGIS 0x8117
++#define GL_DUAL_INTENSITY4_SGIS 0x8118
++#define GL_DUAL_INTENSITY8_SGIS 0x8119
++#define GL_DUAL_INTENSITY12_SGIS 0x811A
++#define GL_DUAL_INTENSITY16_SGIS 0x811B
++#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
++#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
++#define GL_QUAD_ALPHA4_SGIS 0x811E
++#define GL_QUAD_ALPHA8_SGIS 0x811F
++#define GL_QUAD_LUMINANCE4_SGIS 0x8120
++#define GL_QUAD_LUMINANCE8_SGIS 0x8121
++#define GL_QUAD_INTENSITY4_SGIS 0x8122
++#define GL_QUAD_INTENSITY8_SGIS 0x8123
++#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
++#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
++#endif
++
++#ifndef GL_SGIX_sprite
++#define GL_SPRITE_SGIX 0x8148
++#define GL_SPRITE_MODE_SGIX 0x8149
++#define GL_SPRITE_AXIS_SGIX 0x814A
++#define GL_SPRITE_TRANSLATION_SGIX 0x814B
++#define GL_SPRITE_AXIAL_SGIX 0x814C
++#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
++#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
++#endif
++
++#ifndef GL_SGIX_texture_multi_buffer
++#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
++#endif
++
++#ifndef GL_EXT_point_parameters
++#define GL_POINT_SIZE_MIN_EXT 0x8126
++#define GL_POINT_SIZE_MAX_EXT 0x8127
++#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
++#define GL_DISTANCE_ATTENUATION_EXT 0x8129
++#endif
++
++#ifndef GL_SGIS_point_parameters
++#define GL_POINT_SIZE_MIN_SGIS 0x8126
++#define GL_POINT_SIZE_MAX_SGIS 0x8127
++#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
++#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
++#endif
++
++#ifndef GL_SGIX_instruments
++#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
++#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
++#endif
++
++#ifndef GL_SGIX_texture_scale_bias
++#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
++#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
++#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
++#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
++#endif
++
++#ifndef GL_SGIX_framezoom
++#define GL_FRAMEZOOM_SGIX 0x818B
++#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
++#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
++#endif
++
++#ifndef GL_SGIX_tag_sample_buffer
++#endif
++
++#ifndef GL_FfdMaskSGIX
++#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
++#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
++#endif
++
++#ifndef GL_SGIX_polynomial_ffd
++#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
++#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
++#define GL_DEFORMATIONS_MASK_SGIX 0x8196
++#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
++#endif
++
++#ifndef GL_SGIX_reference_plane
++#define GL_REFERENCE_PLANE_SGIX 0x817D
++#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
++#endif
++
++#ifndef GL_SGIX_flush_raster
++#endif
++
++#ifndef GL_SGIX_depth_texture
++#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
++#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
++#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
++#endif
++
++#ifndef GL_SGIS_fog_function
++#define GL_FOG_FUNC_SGIS 0x812A
++#define GL_FOG_FUNC_POINTS_SGIS 0x812B
++#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
++#endif
++
++#ifndef GL_SGIX_fog_offset
++#define GL_FOG_OFFSET_SGIX 0x8198
++#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
++#endif
++
++#ifndef GL_HP_image_transform
++#define GL_IMAGE_SCALE_X_HP 0x8155
++#define GL_IMAGE_SCALE_Y_HP 0x8156
++#define GL_IMAGE_TRANSLATE_X_HP 0x8157
++#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
++#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
++#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
++#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
++#define GL_IMAGE_MAG_FILTER_HP 0x815C
++#define GL_IMAGE_MIN_FILTER_HP 0x815D
++#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
++#define GL_CUBIC_HP 0x815F
++#define GL_AVERAGE_HP 0x8160
++#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
++#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
++#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
++#endif
++
++#ifndef GL_HP_convolution_border_modes
++#define GL_IGNORE_BORDER_HP 0x8150
++#define GL_CONSTANT_BORDER_HP 0x8151
++#define GL_REPLICATE_BORDER_HP 0x8153
++#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
++#endif
++
++#ifndef GL_INGR_palette_buffer
++#endif
++
++#ifndef GL_SGIX_texture_add_env
++#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
++#endif
++
++#ifndef GL_EXT_color_subtable
++#endif
++
++#ifndef GL_PGI_vertex_hints
++#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
++#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
++#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
++#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
++#define GL_COLOR3_BIT_PGI 0x00010000
++#define GL_COLOR4_BIT_PGI 0x00020000
++#define GL_EDGEFLAG_BIT_PGI 0x00040000
++#define GL_INDEX_BIT_PGI 0x00080000
++#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
++#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
++#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
++#define GL_MAT_EMISSION_BIT_PGI 0x00800000
++#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
++#define GL_MAT_SHININESS_BIT_PGI 0x02000000
++#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
++#define GL_NORMAL_BIT_PGI 0x08000000
++#define GL_TEXCOORD1_BIT_PGI 0x10000000
++#define GL_TEXCOORD2_BIT_PGI 0x20000000
++#define GL_TEXCOORD3_BIT_PGI 0x40000000
++#define GL_TEXCOORD4_BIT_PGI 0x80000000
++#define GL_VERTEX23_BIT_PGI 0x00000004
++#define GL_VERTEX4_BIT_PGI 0x00000008
++#endif
++
++#ifndef GL_PGI_misc_hints
++#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
++#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
++#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
++#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
++#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
++#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
++#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
++#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
++#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
++#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
++#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
++#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
++#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
++#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
++#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
++#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
++#define GL_CLIP_NEAR_HINT_PGI 0x1A220
++#define GL_CLIP_FAR_HINT_PGI 0x1A221
++#define GL_WIDE_LINE_HINT_PGI 0x1A222
++#define GL_BACK_NORMALS_HINT_PGI 0x1A223
++#endif
++
++#ifndef GL_EXT_paletted_texture
++#define GL_COLOR_INDEX1_EXT 0x80E2
++#define GL_COLOR_INDEX2_EXT 0x80E3
++#define GL_COLOR_INDEX4_EXT 0x80E4
++#define GL_COLOR_INDEX8_EXT 0x80E5
++#define GL_COLOR_INDEX12_EXT 0x80E6
++#define GL_COLOR_INDEX16_EXT 0x80E7
++#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
++#endif
++
++#ifndef GL_EXT_clip_volume_hint
++#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
++#endif
++
++#ifndef GL_SGIX_list_priority
++#define GL_LIST_PRIORITY_SGIX 0x8182
++#endif
++
++#ifndef GL_SGIX_ir_instrument1
++#define GL_IR_INSTRUMENT1_SGIX 0x817F
++#endif
++
++#ifndef GL_SGIX_calligraphic_fragment
++#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
++#endif
++
++#ifndef GL_SGIX_texture_lod_bias
++#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
++#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
++#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
++#endif
++
++#ifndef GL_SGIX_shadow_ambient
++#define GL_SHADOW_AMBIENT_SGIX 0x80BF
++#endif
++
++#ifndef GL_EXT_index_texture
++#endif
++
++#ifndef GL_EXT_index_material
++#define GL_INDEX_MATERIAL_EXT 0x81B8
++#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
++#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
++#endif
++
++#ifndef GL_EXT_index_func
++#define GL_INDEX_TEST_EXT 0x81B5
++#define GL_INDEX_TEST_FUNC_EXT 0x81B6
++#define GL_INDEX_TEST_REF_EXT 0x81B7
++#endif
++
++#ifndef GL_EXT_index_array_formats
++#define GL_IUI_V2F_EXT 0x81AD
++#define GL_IUI_V3F_EXT 0x81AE
++#define GL_IUI_N3F_V2F_EXT 0x81AF
++#define GL_IUI_N3F_V3F_EXT 0x81B0
++#define GL_T2F_IUI_V2F_EXT 0x81B1
++#define GL_T2F_IUI_V3F_EXT 0x81B2
++#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
++#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
++#endif
++
++#ifndef GL_EXT_compiled_vertex_array
++#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
++#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
++#endif
++
++#ifndef GL_EXT_cull_vertex
++#define GL_CULL_VERTEX_EXT 0x81AA
++#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
++#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
++#endif
++
++#ifndef GL_SGIX_ycrcb
++#define GL_YCRCB_422_SGIX 0x81BB
++#define GL_YCRCB_444_SGIX 0x81BC
++#endif
++
++#ifndef GL_SGIX_fragment_lighting
++#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
++#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
++#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
++#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
++#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
++#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
++#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
++#define GL_LIGHT_ENV_MODE_SGIX 0x8407
++#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
++#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
++#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
++#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
++#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
++#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
++#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
++#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
++#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
++#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
++#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
++#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
++#endif
++
++#ifndef GL_IBM_rasterpos_clip
++#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
++#endif
++
++#ifndef GL_HP_texture_lighting
++#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
++#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
++#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
++#endif
++
++#ifndef GL_EXT_draw_range_elements
++#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
++#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
++#endif
++
++#ifndef GL_WIN_phong_shading
++#define GL_PHONG_WIN 0x80EA
++#define GL_PHONG_HINT_WIN 0x80EB
++#endif
++
++#ifndef GL_WIN_specular_fog
++#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
++#endif
++
++#ifndef GL_EXT_light_texture
++#define GL_FRAGMENT_MATERIAL_EXT 0x8349
++#define GL_FRAGMENT_NORMAL_EXT 0x834A
++#define GL_FRAGMENT_COLOR_EXT 0x834C
++#define GL_ATTENUATION_EXT 0x834D
++#define GL_SHADOW_ATTENUATION_EXT 0x834E
++#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
++#define GL_TEXTURE_LIGHT_EXT 0x8350
++#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
++#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
++/* reuse GL_FRAGMENT_DEPTH_EXT */
++#endif
++
++#ifndef GL_SGIX_blend_alpha_minmax
++#define GL_ALPHA_MIN_SGIX 0x8320
++#define GL_ALPHA_MAX_SGIX 0x8321
++#endif
++
++#ifndef GL_SGIX_impact_pixel_texture
++#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
++#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
++#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
++#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
++#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
++#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
++#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
++#endif
++
++#ifndef GL_EXT_bgra
++#define GL_BGR_EXT 0x80E0
++#define GL_BGRA_EXT 0x80E1
++#endif
++
++#ifndef GL_SGIX_async
++#define GL_ASYNC_MARKER_SGIX 0x8329
++#endif
++
++#ifndef GL_SGIX_async_pixel
++#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
++#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
++#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
++#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
++#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
++#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
++#endif
++
++#ifndef GL_SGIX_async_histogram
++#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
++#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
++#endif
++
++#ifndef GL_INTEL_texture_scissor
++#endif
++
++#ifndef GL_INTEL_parallel_arrays
++#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
++#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
++#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
++#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
++#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
++#endif
++
++#ifndef GL_HP_occlusion_test
++#define GL_OCCLUSION_TEST_HP 0x8165
++#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
++#endif
++
++#ifndef GL_EXT_pixel_transform
++#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
++#define GL_PIXEL_MAG_FILTER_EXT 0x8331
++#define GL_PIXEL_MIN_FILTER_EXT 0x8332
++#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
++#define GL_CUBIC_EXT 0x8334
++#define GL_AVERAGE_EXT 0x8335
++#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
++#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
++#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
++#endif
++
++#ifndef GL_EXT_pixel_transform_color_table
++#endif
++
++#ifndef GL_EXT_shared_texture_palette
++#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
++#endif
++
++#ifndef GL_EXT_separate_specular_color
++#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
++#define GL_SINGLE_COLOR_EXT 0x81F9
++#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
++#endif
++
++#ifndef GL_EXT_secondary_color
++#define GL_COLOR_SUM_EXT 0x8458
++#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
++#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
++#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
++#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
++#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
++#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
++#endif
++
++#ifndef GL_EXT_texture_perturb_normal
++#define GL_PERTURB_EXT 0x85AE
++#define GL_TEXTURE_NORMAL_EXT 0x85AF
++#endif
++
++#ifndef GL_EXT_multi_draw_arrays
++#endif
++
++#ifndef GL_EXT_fog_coord
++#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
++#define GL_FOG_COORDINATE_EXT 0x8451
++#define GL_FRAGMENT_DEPTH_EXT 0x8452
++#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
++#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
++#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
++#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
++#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
++#endif
++
++#ifndef GL_REND_screen_coordinates
++#define GL_SCREEN_COORDINATES_REND 0x8490
++#define GL_INVERTED_SCREEN_W_REND 0x8491
++#endif
++
++#ifndef GL_EXT_coordinate_frame
++#define GL_TANGENT_ARRAY_EXT 0x8439
++#define GL_BINORMAL_ARRAY_EXT 0x843A
++#define GL_CURRENT_TANGENT_EXT 0x843B
++#define GL_CURRENT_BINORMAL_EXT 0x843C
++#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
++#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
++#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
++#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
++#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
++#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
++#define GL_MAP1_TANGENT_EXT 0x8444
++#define GL_MAP2_TANGENT_EXT 0x8445
++#define GL_MAP1_BINORMAL_EXT 0x8446
++#define GL_MAP2_BINORMAL_EXT 0x8447
++#endif
++
++#ifndef GL_EXT_texture_env_combine
++#define GL_COMBINE_EXT 0x8570
++#define GL_COMBINE_RGB_EXT 0x8571
++#define GL_COMBINE_ALPHA_EXT 0x8572
++#define GL_RGB_SCALE_EXT 0x8573
++#define GL_ADD_SIGNED_EXT 0x8574
++#define GL_INTERPOLATE_EXT 0x8575
++#define GL_CONSTANT_EXT 0x8576
++#define GL_PRIMARY_COLOR_EXT 0x8577
++#define GL_PREVIOUS_EXT 0x8578
++#define GL_SOURCE0_RGB_EXT 0x8580
++#define GL_SOURCE1_RGB_EXT 0x8581
++#define GL_SOURCE2_RGB_EXT 0x8582
++#define GL_SOURCE0_ALPHA_EXT 0x8588
++#define GL_SOURCE1_ALPHA_EXT 0x8589
++#define GL_SOURCE2_ALPHA_EXT 0x858A
++#define GL_OPERAND0_RGB_EXT 0x8590
++#define GL_OPERAND1_RGB_EXT 0x8591
++#define GL_OPERAND2_RGB_EXT 0x8592
++#define GL_OPERAND0_ALPHA_EXT 0x8598
++#define GL_OPERAND1_ALPHA_EXT 0x8599
++#define GL_OPERAND2_ALPHA_EXT 0x859A
++#endif
++
++#ifndef GL_APPLE_specular_vector
++#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
++#endif
++
++#ifndef GL_APPLE_transform_hint
++#define GL_TRANSFORM_HINT_APPLE 0x85B1
++#endif
++
++#ifndef GL_SGIX_fog_scale
++#define GL_FOG_SCALE_SGIX 0x81FC
++#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
++#endif
++
++#ifndef GL_SUNX_constant_data
++#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
++#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
++#endif
++
++#ifndef GL_SUN_global_alpha
++#define GL_GLOBAL_ALPHA_SUN 0x81D9
++#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
++#endif
++
++#ifndef GL_SUN_triangle_list
++#define GL_RESTART_SUN 0x0001
++#define GL_REPLACE_MIDDLE_SUN 0x0002
++#define GL_REPLACE_OLDEST_SUN 0x0003
++#define GL_TRIANGLE_LIST_SUN 0x81D7
++#define GL_REPLACEMENT_CODE_SUN 0x81D8
++#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
++#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
++#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
++#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
++#define GL_R1UI_V3F_SUN 0x85C4
++#define GL_R1UI_C4UB_V3F_SUN 0x85C5
++#define GL_R1UI_C3F_V3F_SUN 0x85C6
++#define GL_R1UI_N3F_V3F_SUN 0x85C7
++#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
++#define GL_R1UI_T2F_V3F_SUN 0x85C9
++#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
++#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
++#endif
++
++#ifndef GL_SUN_vertex
++#endif
++
++#ifndef GL_EXT_blend_func_separate
++#define GL_BLEND_DST_RGB_EXT 0x80C8
++#define GL_BLEND_SRC_RGB_EXT 0x80C9
++#define GL_BLEND_DST_ALPHA_EXT 0x80CA
++#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
++#endif
++
++#ifndef GL_INGR_color_clamp
++#define GL_RED_MIN_CLAMP_INGR 0x8560
++#define GL_GREEN_MIN_CLAMP_INGR 0x8561
++#define GL_BLUE_MIN_CLAMP_INGR 0x8562
++#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
++#define GL_RED_MAX_CLAMP_INGR 0x8564
++#define GL_GREEN_MAX_CLAMP_INGR 0x8565
++#define GL_BLUE_MAX_CLAMP_INGR 0x8566
++#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
++#endif
++
++#ifndef GL_INGR_interlace_read
++#define GL_INTERLACE_READ_INGR 0x8568
++#endif
++
++#ifndef GL_EXT_stencil_wrap
++#define GL_INCR_WRAP_EXT 0x8507
++#define GL_DECR_WRAP_EXT 0x8508
++#endif
++
++#ifndef GL_EXT_422_pixels
++#define GL_422_EXT 0x80CC
++#define GL_422_REV_EXT 0x80CD
++#define GL_422_AVERAGE_EXT 0x80CE
++#define GL_422_REV_AVERAGE_EXT 0x80CF
++#endif
++
++#ifndef GL_NV_texgen_reflection
++#define GL_NORMAL_MAP_NV 0x8511
++#define GL_REFLECTION_MAP_NV 0x8512
++#endif
++
++#ifndef GL_EXT_texture_cube_map
++#define GL_NORMAL_MAP_EXT 0x8511
++#define GL_REFLECTION_MAP_EXT 0x8512
++#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
++#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
++#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
++#endif
++
++#ifndef GL_SUN_convolution_border_modes
++#define GL_WRAP_BORDER_SUN 0x81D4
++#endif
++
++#ifndef GL_EXT_texture_env_add
++#endif
++
++#ifndef GL_EXT_texture_lod_bias
++#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
++#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
++#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
++#endif
++
++#ifndef GL_EXT_texture_filter_anisotropic
++#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
++#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
++#endif
++
++#ifndef GL_EXT_vertex_weighting
++#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
++#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
++#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
++#define GL_MODELVIEW1_MATRIX_EXT 0x8506
++#define GL_VERTEX_WEIGHTING_EXT 0x8509
++#define GL_MODELVIEW0_EXT GL_MODELVIEW
++#define GL_MODELVIEW1_EXT 0x850A
++#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
++#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
++#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
++#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
++#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
++#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
++#endif
++
++#ifndef GL_NV_light_max_exponent
++#define GL_MAX_SHININESS_NV 0x8504
++#define GL_MAX_SPOT_EXPONENT_NV 0x8505
++#endif
++
++#ifndef GL_NV_vertex_array_range
++#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
++#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
++#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
++#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
++#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
++#endif
++
++#ifndef GL_NV_register_combiners
++#define GL_REGISTER_COMBINERS_NV 0x8522
++#define GL_VARIABLE_A_NV 0x8523
++#define GL_VARIABLE_B_NV 0x8524
++#define GL_VARIABLE_C_NV 0x8525
++#define GL_VARIABLE_D_NV 0x8526
++#define GL_VARIABLE_E_NV 0x8527
++#define GL_VARIABLE_F_NV 0x8528
++#define GL_VARIABLE_G_NV 0x8529
++#define GL_CONSTANT_COLOR0_NV 0x852A
++#define GL_CONSTANT_COLOR1_NV 0x852B
++#define GL_PRIMARY_COLOR_NV 0x852C
++#define GL_SECONDARY_COLOR_NV 0x852D
++#define GL_SPARE0_NV 0x852E
++#define GL_SPARE1_NV 0x852F
++#define GL_DISCARD_NV 0x8530
++#define GL_E_TIMES_F_NV 0x8531
++#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
++#define GL_UNSIGNED_IDENTITY_NV 0x8536
++#define GL_UNSIGNED_INVERT_NV 0x8537
++#define GL_EXPAND_NORMAL_NV 0x8538
++#define GL_EXPAND_NEGATE_NV 0x8539
++#define GL_HALF_BIAS_NORMAL_NV 0x853A
++#define GL_HALF_BIAS_NEGATE_NV 0x853B
++#define GL_SIGNED_IDENTITY_NV 0x853C
++#define GL_SIGNED_NEGATE_NV 0x853D
++#define GL_SCALE_BY_TWO_NV 0x853E
++#define GL_SCALE_BY_FOUR_NV 0x853F
++#define GL_SCALE_BY_ONE_HALF_NV 0x8540
++#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
++#define GL_COMBINER_INPUT_NV 0x8542
++#define GL_COMBINER_MAPPING_NV 0x8543
++#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
++#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
++#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
++#define GL_COMBINER_MUX_SUM_NV 0x8547
++#define GL_COMBINER_SCALE_NV 0x8548
++#define GL_COMBINER_BIAS_NV 0x8549
++#define GL_COMBINER_AB_OUTPUT_NV 0x854A
++#define GL_COMBINER_CD_OUTPUT_NV 0x854B
++#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
++#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
++#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
++#define GL_COLOR_SUM_CLAMP_NV 0x854F
++#define GL_COMBINER0_NV 0x8550
++#define GL_COMBINER1_NV 0x8551
++#define GL_COMBINER2_NV 0x8552
++#define GL_COMBINER3_NV 0x8553
++#define GL_COMBINER4_NV 0x8554
++#define GL_COMBINER5_NV 0x8555
++#define GL_COMBINER6_NV 0x8556
++#define GL_COMBINER7_NV 0x8557
++/* reuse GL_TEXTURE0_ARB */
++/* reuse GL_TEXTURE1_ARB */
++/* reuse GL_ZERO */
++/* reuse GL_NONE */
++/* reuse GL_FOG */
++#endif
++
++#ifndef GL_NV_fog_distance
++#define GL_FOG_DISTANCE_MODE_NV 0x855A
++#define GL_EYE_RADIAL_NV 0x855B
++#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
++/* reuse GL_EYE_PLANE */
++#endif
++
++#ifndef GL_NV_texgen_emboss
++#define GL_EMBOSS_LIGHT_NV 0x855D
++#define GL_EMBOSS_CONSTANT_NV 0x855E
++#define GL_EMBOSS_MAP_NV 0x855F
++#endif
++
++#ifndef GL_NV_blend_square
++#endif
++
++#ifndef GL_NV_texture_env_combine4
++#define GL_COMBINE4_NV 0x8503
++#define GL_SOURCE3_RGB_NV 0x8583
++#define GL_SOURCE3_ALPHA_NV 0x858B
++#define GL_OPERAND3_RGB_NV 0x8593
++#define GL_OPERAND3_ALPHA_NV 0x859B
++#endif
++
++#ifndef GL_MESA_resize_buffers
++#endif
++
++#ifndef GL_MESA_window_pos
++#endif
++
++#ifndef GL_EXT_texture_compression_s3tc
++#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
++#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
++#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
++#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
++#endif
++
++#ifndef GL_IBM_cull_vertex
++#define GL_CULL_VERTEX_IBM 103050
++#endif
++
++#ifndef GL_IBM_multimode_draw_arrays
++#endif
++
++#ifndef GL_IBM_vertex_array_lists
++#define GL_VERTEX_ARRAY_LIST_IBM 103070
++#define GL_NORMAL_ARRAY_LIST_IBM 103071
++#define GL_COLOR_ARRAY_LIST_IBM 103072
++#define GL_INDEX_ARRAY_LIST_IBM 103073
++#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
++#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
++#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
++#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
++#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
++#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
++#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
++#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
++#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
++#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
++#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
++#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
++#endif
++
++#ifndef GL_SGIX_subsample
++#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
++#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
++#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
++#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
++#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
++#endif
++
++#ifndef GL_SGIX_ycrcb_subsample
++#endif
++
++#ifndef GL_SGIX_ycrcba
++#define GL_YCRCB_SGIX 0x8318
++#define GL_YCRCBA_SGIX 0x8319
++#endif
++
++#ifndef GL_SGI_depth_pass_instrument
++#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
++#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
++#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
++#endif
++
++#ifndef GL_3DFX_texture_compression_FXT1
++#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
++#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
++#endif
++
++#ifndef GL_3DFX_multisample
++#define GL_MULTISAMPLE_3DFX 0x86B2
++#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
++#define GL_SAMPLES_3DFX 0x86B4
++#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
++#endif
++
++#ifndef GL_3DFX_tbuffer
++#endif
++
++#ifndef GL_EXT_multisample
++#define GL_MULTISAMPLE_EXT 0x809D
++#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
++#define GL_SAMPLE_MASK_EXT 0x80A0
++#define GL_1PASS_EXT 0x80A1
++#define GL_2PASS_0_EXT 0x80A2
++#define GL_2PASS_1_EXT 0x80A3
++#define GL_4PASS_0_EXT 0x80A4
++#define GL_4PASS_1_EXT 0x80A5
++#define GL_4PASS_2_EXT 0x80A6
++#define GL_4PASS_3_EXT 0x80A7
++#define GL_SAMPLE_BUFFERS_EXT 0x80A8
++#define GL_SAMPLES_EXT 0x80A9
++#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
++#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
++#define GL_SAMPLE_PATTERN_EXT 0x80AC
++#define GL_MULTISAMPLE_BIT_EXT 0x20000000
++#endif
++
++#ifndef GL_SGIX_vertex_preclip
++#define GL_VERTEX_PRECLIP_SGIX 0x83EE
++#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
++#endif
++
++#ifndef GL_SGIX_convolution_accuracy
++#define GL_CONVOLUTION_HINT_SGIX 0x8316
++#endif
++
++#ifndef GL_SGIX_resample
++#define GL_PACK_RESAMPLE_SGIX 0x842C
++#define GL_UNPACK_RESAMPLE_SGIX 0x842D
++#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
++#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
++#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
++#endif
++
++#ifndef GL_SGIS_point_line_texgen
++#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
++#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
++#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
++#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
++#define GL_EYE_POINT_SGIS 0x81F4
++#define GL_OBJECT_POINT_SGIS 0x81F5
++#define GL_EYE_LINE_SGIS 0x81F6
++#define GL_OBJECT_LINE_SGIS 0x81F7
++#endif
++
++#ifndef GL_SGIS_texture_color_mask
++#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
++#endif
++
++#ifndef GL_EXT_texture_env_dot3
++#define GL_DOT3_RGB_EXT 0x8740
++#define GL_DOT3_RGBA_EXT 0x8741
++#endif
++
++#ifndef GL_ATI_texture_mirror_once
++#define GL_MIRROR_CLAMP_ATI 0x8742
++#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
++#endif
++
++#ifndef GL_NV_fence
++#define GL_ALL_COMPLETED_NV 0x84F2
++#define GL_FENCE_STATUS_NV 0x84F3
++#define GL_FENCE_CONDITION_NV 0x84F4
++#endif
++
++#ifndef GL_IBM_texture_mirrored_repeat
++#define GL_MIRRORED_REPEAT_IBM 0x8370
++#endif
++
++#ifndef GL_NV_evaluators
++#define GL_EVAL_2D_NV 0x86C0
++#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
++#define GL_MAP_TESSELLATION_NV 0x86C2
++#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
++#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
++#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
++#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
++#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
++#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
++#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
++#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
++#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
++#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
++#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
++#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
++#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
++#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
++#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
++#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
++#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
++#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
++#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
++#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
++#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
++#endif
++
++#ifndef GL_NV_packed_depth_stencil
++#define GL_DEPTH_STENCIL_NV 0x84F9
++#define GL_UNSIGNED_INT_24_8_NV 0x84FA
++#endif
++
++#ifndef GL_NV_register_combiners2
++#define GL_PER_STAGE_CONSTANTS_NV 0x8535
++#endif
++
++#ifndef GL_NV_texture_compression_vtc
++#endif
++
++#ifndef GL_NV_texture_rectangle
++#define GL_TEXTURE_RECTANGLE_NV 0x84F5
++#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
++#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
++#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
++#endif
++
++#ifndef GL_NV_texture_shader
++#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
++#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
++#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
++#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
++#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
++#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
++#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
++#define GL_SHADER_CONSISTENT_NV 0x86DD
++#define GL_TEXTURE_SHADER_NV 0x86DE
++#define GL_SHADER_OPERATION_NV 0x86DF
++#define GL_CULL_MODES_NV 0x86E0
++#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
++#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
++#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
++#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
++#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
++#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
++#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
++#define GL_CONST_EYE_NV 0x86E5
++#define GL_PASS_THROUGH_NV 0x86E6
++#define GL_CULL_FRAGMENT_NV 0x86E7
++#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
++#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
++#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
++#define GL_DOT_PRODUCT_NV 0x86EC
++#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
++#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
++#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
++#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
++#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
++#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
++#define GL_HILO_NV 0x86F4
++#define GL_DSDT_NV 0x86F5
++#define GL_DSDT_MAG_NV 0x86F6
++#define GL_DSDT_MAG_VIB_NV 0x86F7
++#define GL_HILO16_NV 0x86F8
++#define GL_SIGNED_HILO_NV 0x86F9
++#define GL_SIGNED_HILO16_NV 0x86FA
++#define GL_SIGNED_RGBA_NV 0x86FB
++#define GL_SIGNED_RGBA8_NV 0x86FC
++#define GL_SIGNED_RGB_NV 0x86FE
++#define GL_SIGNED_RGB8_NV 0x86FF
++#define GL_SIGNED_LUMINANCE_NV 0x8701
++#define GL_SIGNED_LUMINANCE8_NV 0x8702
++#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
++#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
++#define GL_SIGNED_ALPHA_NV 0x8705
++#define GL_SIGNED_ALPHA8_NV 0x8706
++#define GL_SIGNED_INTENSITY_NV 0x8707
++#define GL_SIGNED_INTENSITY8_NV 0x8708
++#define GL_DSDT8_NV 0x8709
++#define GL_DSDT8_MAG8_NV 0x870A
++#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
++#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
++#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
++#define GL_HI_SCALE_NV 0x870E
++#define GL_LO_SCALE_NV 0x870F
++#define GL_DS_SCALE_NV 0x8710
++#define GL_DT_SCALE_NV 0x8711
++#define GL_MAGNITUDE_SCALE_NV 0x8712
++#define GL_VIBRANCE_SCALE_NV 0x8713
++#define GL_HI_BIAS_NV 0x8714
++#define GL_LO_BIAS_NV 0x8715
++#define GL_DS_BIAS_NV 0x8716
++#define GL_DT_BIAS_NV 0x8717
++#define GL_MAGNITUDE_BIAS_NV 0x8718
++#define GL_VIBRANCE_BIAS_NV 0x8719
++#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
++#define GL_TEXTURE_HI_SIZE_NV 0x871B
++#define GL_TEXTURE_LO_SIZE_NV 0x871C
++#define GL_TEXTURE_DS_SIZE_NV 0x871D
++#define GL_TEXTURE_DT_SIZE_NV 0x871E
++#define GL_TEXTURE_MAG_SIZE_NV 0x871F
++#endif
++
++#ifndef GL_NV_texture_shader2
++#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
++#endif
++
++#ifndef GL_NV_vertex_array_range2
++#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
++#endif
++
++#ifndef GL_NV_vertex_program
++#define GL_VERTEX_PROGRAM_NV 0x8620
++#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
++#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
++#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
++#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
++#define GL_CURRENT_ATTRIB_NV 0x8626
++#define GL_PROGRAM_LENGTH_NV 0x8627
++#define GL_PROGRAM_STRING_NV 0x8628
++#define GL_MODELVIEW_PROJECTION_NV 0x8629
++#define GL_IDENTITY_NV 0x862A
++#define GL_INVERSE_NV 0x862B
++#define GL_TRANSPOSE_NV 0x862C
++#define GL_INVERSE_TRANSPOSE_NV 0x862D
++#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
++#define GL_MAX_TRACK_MATRICES_NV 0x862F
++#define GL_MATRIX0_NV 0x8630
++#define GL_MATRIX1_NV 0x8631
++#define GL_MATRIX2_NV 0x8632
++#define GL_MATRIX3_NV 0x8633
++#define GL_MATRIX4_NV 0x8634
++#define GL_MATRIX5_NV 0x8635
++#define GL_MATRIX6_NV 0x8636
++#define GL_MATRIX7_NV 0x8637
++#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
++#define GL_CURRENT_MATRIX_NV 0x8641
++#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
++#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
++#define GL_PROGRAM_PARAMETER_NV 0x8644
++#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
++#define GL_PROGRAM_TARGET_NV 0x8646
++#define GL_PROGRAM_RESIDENT_NV 0x8647
++#define GL_TRACK_MATRIX_NV 0x8648
++#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
++#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
++#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
++#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
++#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
++#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
++#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
++#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
++#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
++#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
++#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
++#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
++#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
++#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
++#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
++#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
++#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
++#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
++#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
++#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
++#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
++#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
++#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
++#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
++#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
++#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
++#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
++#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
++#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
++#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
++#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
++#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
++#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
++#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
++#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
++#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
++#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
++#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
++#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
++#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
++#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
++#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
++#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
++#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
++#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
++#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
++#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
++#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
++#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
++#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
++#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
++#endif
++
++#ifndef GL_SGIX_texture_coordinate_clamp
++#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
++#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
++#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
++#endif
++
++#ifndef GL_SGIX_scalebias_hint
++#define GL_SCALEBIAS_HINT_SGIX 0x8322
++#endif
++
++#ifndef GL_OML_interlace
++#define GL_INTERLACE_OML 0x8980
++#define GL_INTERLACE_READ_OML 0x8981
++#endif
++
++#ifndef GL_OML_subsample
++#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
++#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
++#endif
++
++#ifndef GL_OML_resample
++#define GL_PACK_RESAMPLE_OML 0x8984
++#define GL_UNPACK_RESAMPLE_OML 0x8985
++#define GL_RESAMPLE_REPLICATE_OML 0x8986
++#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
++#define GL_RESAMPLE_AVERAGE_OML 0x8988
++#define GL_RESAMPLE_DECIMATE_OML 0x8989
++#endif
++
++#ifndef GL_NV_copy_depth_to_color
++#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
++#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
++#endif
++
++#ifndef GL_ATI_envmap_bumpmap
++#define GL_BUMP_ROT_MATRIX_ATI 0x8775
++#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
++#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
++#define GL_BUMP_TEX_UNITS_ATI 0x8778
++#define GL_DUDV_ATI 0x8779
++#define GL_DU8DV8_ATI 0x877A
++#define GL_BUMP_ENVMAP_ATI 0x877B
++#define GL_BUMP_TARGET_ATI 0x877C
++#endif
++
++#ifndef GL_ATI_fragment_shader
++#define GL_FRAGMENT_SHADER_ATI 0x8920
++#define GL_REG_0_ATI 0x8921
++#define GL_REG_1_ATI 0x8922
++#define GL_REG_2_ATI 0x8923
++#define GL_REG_3_ATI 0x8924
++#define GL_REG_4_ATI 0x8925
++#define GL_REG_5_ATI 0x8926
++#define GL_REG_6_ATI 0x8927
++#define GL_REG_7_ATI 0x8928
++#define GL_REG_8_ATI 0x8929
++#define GL_REG_9_ATI 0x892A
++#define GL_REG_10_ATI 0x892B
++#define GL_REG_11_ATI 0x892C
++#define GL_REG_12_ATI 0x892D
++#define GL_REG_13_ATI 0x892E
++#define GL_REG_14_ATI 0x892F
++#define GL_REG_15_ATI 0x8930
++#define GL_REG_16_ATI 0x8931
++#define GL_REG_17_ATI 0x8932
++#define GL_REG_18_ATI 0x8933
++#define GL_REG_19_ATI 0x8934
++#define GL_REG_20_ATI 0x8935
++#define GL_REG_21_ATI 0x8936
++#define GL_REG_22_ATI 0x8937
++#define GL_REG_23_ATI 0x8938
++#define GL_REG_24_ATI 0x8939
++#define GL_REG_25_ATI 0x893A
++#define GL_REG_26_ATI 0x893B
++#define GL_REG_27_ATI 0x893C
++#define GL_REG_28_ATI 0x893D
++#define GL_REG_29_ATI 0x893E
++#define GL_REG_30_ATI 0x893F
++#define GL_REG_31_ATI 0x8940
++#define GL_CON_0_ATI 0x8941
++#define GL_CON_1_ATI 0x8942
++#define GL_CON_2_ATI 0x8943
++#define GL_CON_3_ATI 0x8944
++#define GL_CON_4_ATI 0x8945
++#define GL_CON_5_ATI 0x8946
++#define GL_CON_6_ATI 0x8947
++#define GL_CON_7_ATI 0x8948
++#define GL_CON_8_ATI 0x8949
++#define GL_CON_9_ATI 0x894A
++#define GL_CON_10_ATI 0x894B
++#define GL_CON_11_ATI 0x894C
++#define GL_CON_12_ATI 0x894D
++#define GL_CON_13_ATI 0x894E
++#define GL_CON_14_ATI 0x894F
++#define GL_CON_15_ATI 0x8950
++#define GL_CON_16_ATI 0x8951
++#define GL_CON_17_ATI 0x8952
++#define GL_CON_18_ATI 0x8953
++#define GL_CON_19_ATI 0x8954
++#define GL_CON_20_ATI 0x8955
++#define GL_CON_21_ATI 0x8956
++#define GL_CON_22_ATI 0x8957
++#define GL_CON_23_ATI 0x8958
++#define GL_CON_24_ATI 0x8959
++#define GL_CON_25_ATI 0x895A
++#define GL_CON_26_ATI 0x895B
++#define GL_CON_27_ATI 0x895C
++#define GL_CON_28_ATI 0x895D
++#define GL_CON_29_ATI 0x895E
++#define GL_CON_30_ATI 0x895F
++#define GL_CON_31_ATI 0x8960
++#define GL_MOV_ATI 0x8961
++#define GL_ADD_ATI 0x8963
++#define GL_MUL_ATI 0x8964
++#define GL_SUB_ATI 0x8965
++#define GL_DOT3_ATI 0x8966
++#define GL_DOT4_ATI 0x8967
++#define GL_MAD_ATI 0x8968
++#define GL_LERP_ATI 0x8969
++#define GL_CND_ATI 0x896A
++#define GL_CND0_ATI 0x896B
++#define GL_DOT2_ADD_ATI 0x896C
++#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
++#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
++#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
++#define GL_NUM_PASSES_ATI 0x8970
++#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
++#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
++#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
++#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
++#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
++#define GL_SWIZZLE_STR_ATI 0x8976
++#define GL_SWIZZLE_STQ_ATI 0x8977
++#define GL_SWIZZLE_STR_DR_ATI 0x8978
++#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
++#define GL_SWIZZLE_STRQ_ATI 0x897A
++#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
++#define GL_RED_BIT_ATI 0x00000001
++#define GL_GREEN_BIT_ATI 0x00000002
++#define GL_BLUE_BIT_ATI 0x00000004
++#define GL_2X_BIT_ATI 0x00000001
++#define GL_4X_BIT_ATI 0x00000002
++#define GL_8X_BIT_ATI 0x00000004
++#define GL_HALF_BIT_ATI 0x00000008
++#define GL_QUARTER_BIT_ATI 0x00000010
++#define GL_EIGHTH_BIT_ATI 0x00000020
++#define GL_SATURATE_BIT_ATI 0x00000040
++#define GL_COMP_BIT_ATI 0x00000002
++#define GL_NEGATE_BIT_ATI 0x00000004
++#define GL_BIAS_BIT_ATI 0x00000008
++#endif
++
++#ifndef GL_ATI_pn_triangles
++#define GL_PN_TRIANGLES_ATI 0x87F0
++#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
++#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
++#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
++#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
++#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
++#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
++#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
++#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
++#endif
++
++#ifndef GL_ATI_vertex_array_object
++#define GL_STATIC_ATI 0x8760
++#define GL_DYNAMIC_ATI 0x8761
++#define GL_PRESERVE_ATI 0x8762
++#define GL_DISCARD_ATI 0x8763
++#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
++#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
++#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
++#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
++#endif
++
++#ifndef GL_EXT_vertex_shader
++#define GL_VERTEX_SHADER_EXT 0x8780
++#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
++#define GL_OP_INDEX_EXT 0x8782
++#define GL_OP_NEGATE_EXT 0x8783
++#define GL_OP_DOT3_EXT 0x8784
++#define GL_OP_DOT4_EXT 0x8785
++#define GL_OP_MUL_EXT 0x8786
++#define GL_OP_ADD_EXT 0x8787
++#define GL_OP_MADD_EXT 0x8788
++#define GL_OP_FRAC_EXT 0x8789
++#define GL_OP_MAX_EXT 0x878A
++#define GL_OP_MIN_EXT 0x878B
++#define GL_OP_SET_GE_EXT 0x878C
++#define GL_OP_SET_LT_EXT 0x878D
++#define GL_OP_CLAMP_EXT 0x878E
++#define GL_OP_FLOOR_EXT 0x878F
++#define GL_OP_ROUND_EXT 0x8790
++#define GL_OP_EXP_BASE_2_EXT 0x8791
++#define GL_OP_LOG_BASE_2_EXT 0x8792
++#define GL_OP_POWER_EXT 0x8793
++#define GL_OP_RECIP_EXT 0x8794
++#define GL_OP_RECIP_SQRT_EXT 0x8795
++#define GL_OP_SUB_EXT 0x8796
++#define GL_OP_CROSS_PRODUCT_EXT 0x8797
++#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
++#define GL_OP_MOV_EXT 0x8799
++#define GL_OUTPUT_VERTEX_EXT 0x879A
++#define GL_OUTPUT_COLOR0_EXT 0x879B
++#define GL_OUTPUT_COLOR1_EXT 0x879C
++#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
++#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
++#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
++#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
++#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
++#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
++#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
++#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
++#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
++#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
++#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
++#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
++#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
++#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
++#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
++#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
++#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
++#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
++#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
++#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
++#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
++#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
++#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
++#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
++#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
++#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
++#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
++#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
++#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
++#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
++#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
++#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
++#define GL_OUTPUT_FOG_EXT 0x87BD
++#define GL_SCALAR_EXT 0x87BE
++#define GL_VECTOR_EXT 0x87BF
++#define GL_MATRIX_EXT 0x87C0
++#define GL_VARIANT_EXT 0x87C1
++#define GL_INVARIANT_EXT 0x87C2
++#define GL_LOCAL_CONSTANT_EXT 0x87C3
++#define GL_LOCAL_EXT 0x87C4
++#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
++#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
++#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
++#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
++#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
++#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
++#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
++#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
++#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
++#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
++#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
++#define GL_X_EXT 0x87D5
++#define GL_Y_EXT 0x87D6
++#define GL_Z_EXT 0x87D7
++#define GL_W_EXT 0x87D8
++#define GL_NEGATIVE_X_EXT 0x87D9
++#define GL_NEGATIVE_Y_EXT 0x87DA
++#define GL_NEGATIVE_Z_EXT 0x87DB
++#define GL_NEGATIVE_W_EXT 0x87DC
++#define GL_ZERO_EXT 0x87DD
++#define GL_ONE_EXT 0x87DE
++#define GL_NEGATIVE_ONE_EXT 0x87DF
++#define GL_NORMALIZED_RANGE_EXT 0x87E0
++#define GL_FULL_RANGE_EXT 0x87E1
++#define GL_CURRENT_VERTEX_EXT 0x87E2
++#define GL_MVP_MATRIX_EXT 0x87E3
++#define GL_VARIANT_VALUE_EXT 0x87E4
++#define GL_VARIANT_DATATYPE_EXT 0x87E5
++#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
++#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
++#define GL_VARIANT_ARRAY_EXT 0x87E8
++#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
++#define GL_INVARIANT_VALUE_EXT 0x87EA
++#define GL_INVARIANT_DATATYPE_EXT 0x87EB
++#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
++#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
++#endif
++
++#ifndef GL_ATI_vertex_streams
++#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
++#define GL_VERTEX_STREAM0_ATI 0x876C
++#define GL_VERTEX_STREAM1_ATI 0x876D
++#define GL_VERTEX_STREAM2_ATI 0x876E
++#define GL_VERTEX_STREAM3_ATI 0x876F
++#define GL_VERTEX_STREAM4_ATI 0x8770
++#define GL_VERTEX_STREAM5_ATI 0x8771
++#define GL_VERTEX_STREAM6_ATI 0x8772
++#define GL_VERTEX_STREAM7_ATI 0x8773
++#define GL_VERTEX_SOURCE_ATI 0x8774
++#endif
++
++#ifndef GL_ATI_element_array
++#define GL_ELEMENT_ARRAY_ATI 0x8768
++#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
++#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
++#endif
++
++#ifndef GL_SUN_mesh_array
++#define GL_QUAD_MESH_SUN 0x8614
++#define GL_TRIANGLE_MESH_SUN 0x8615
++#endif
++
++#ifndef GL_SUN_slice_accum
++#define GL_SLICE_ACCUM_SUN 0x85CC
++#endif
++
++#ifndef GL_NV_multisample_filter_hint
++#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
++#endif
++
++#ifndef GL_NV_depth_clamp
++#define GL_DEPTH_CLAMP_NV 0x864F
++#endif
++
++#ifndef GL_NV_occlusion_query
++#define GL_PIXEL_COUNTER_BITS_NV 0x8864
++#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
++#define GL_PIXEL_COUNT_NV 0x8866
++#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
++#endif
++
++#ifndef GL_NV_point_sprite
++#define GL_POINT_SPRITE_NV 0x8861
++#define GL_COORD_REPLACE_NV 0x8862
++#define GL_POINT_SPRITE_R_MODE_NV 0x8863
++#endif
++
++#ifndef GL_NV_texture_shader3
++#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
++#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
++#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
++#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
++#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
++#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
++#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
++#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
++#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
++#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
++#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
++#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
++#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
++#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
++#define GL_HILO8_NV 0x885E
++#define GL_SIGNED_HILO8_NV 0x885F
++#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
++#endif
++
++#ifndef GL_NV_vertex_program1_1
++#endif
++
++#ifndef GL_EXT_shadow_funcs
++#endif
++
++#ifndef GL_EXT_stencil_two_side
++#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
++#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
++#endif
++
++#ifndef GL_ATI_text_fragment_shader
++#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
++#endif
++
++#ifndef GL_APPLE_client_storage
++#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
++#endif
++
++#ifndef GL_APPLE_element_array
++#define GL_ELEMENT_ARRAY_APPLE 0x8768
++#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
++#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
++#endif
++
++#ifndef GL_APPLE_fence
++#define GL_DRAW_PIXELS_APPLE 0x8A0A
++#define GL_FENCE_APPLE 0x8A0B
++#endif
++
++#ifndef GL_APPLE_vertex_array_object
++#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
++#endif
++
++#ifndef GL_APPLE_vertex_array_range
++#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
++#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
++#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
++#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
++#define GL_STORAGE_CACHED_APPLE 0x85BE
++#define GL_STORAGE_SHARED_APPLE 0x85BF
++#endif
++
++#ifndef GL_APPLE_ycbcr_422
++#define GL_YCBCR_422_APPLE 0x85B9
++#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
++#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
++#endif
++
++#ifndef GL_S3_s3tc
++#define GL_RGB_S3TC 0x83A0
++#define GL_RGB4_S3TC 0x83A1
++#define GL_RGBA_S3TC 0x83A2
++#define GL_RGBA4_S3TC 0x83A3
++#endif
++
++#ifndef GL_ATI_draw_buffers
++#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
++#define GL_DRAW_BUFFER0_ATI 0x8825
++#define GL_DRAW_BUFFER1_ATI 0x8826
++#define GL_DRAW_BUFFER2_ATI 0x8827
++#define GL_DRAW_BUFFER3_ATI 0x8828
++#define GL_DRAW_BUFFER4_ATI 0x8829
++#define GL_DRAW_BUFFER5_ATI 0x882A
++#define GL_DRAW_BUFFER6_ATI 0x882B
++#define GL_DRAW_BUFFER7_ATI 0x882C
++#define GL_DRAW_BUFFER8_ATI 0x882D
++#define GL_DRAW_BUFFER9_ATI 0x882E
++#define GL_DRAW_BUFFER10_ATI 0x882F
++#define GL_DRAW_BUFFER11_ATI 0x8830
++#define GL_DRAW_BUFFER12_ATI 0x8831
++#define GL_DRAW_BUFFER13_ATI 0x8832
++#define GL_DRAW_BUFFER14_ATI 0x8833
++#define GL_DRAW_BUFFER15_ATI 0x8834
++#endif
++
++#ifndef GL_ATI_pixel_format_float
++#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
++#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
++#endif
++
++#ifndef GL_ATI_texture_env_combine3
++#define GL_MODULATE_ADD_ATI 0x8744
++#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
++#define GL_MODULATE_SUBTRACT_ATI 0x8746
++#endif
++
++#ifndef GL_ATI_texture_float
++#define GL_RGBA_FLOAT32_ATI 0x8814
++#define GL_RGB_FLOAT32_ATI 0x8815
++#define GL_ALPHA_FLOAT32_ATI 0x8816
++#define GL_INTENSITY_FLOAT32_ATI 0x8817
++#define GL_LUMINANCE_FLOAT32_ATI 0x8818
++#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
++#define GL_RGBA_FLOAT16_ATI 0x881A
++#define GL_RGB_FLOAT16_ATI 0x881B
++#define GL_ALPHA_FLOAT16_ATI 0x881C
++#define GL_INTENSITY_FLOAT16_ATI 0x881D
++#define GL_LUMINANCE_FLOAT16_ATI 0x881E
++#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
++#endif
++
++#ifndef GL_NV_float_buffer
++#define GL_FLOAT_R_NV 0x8880
++#define GL_FLOAT_RG_NV 0x8881
++#define GL_FLOAT_RGB_NV 0x8882
++#define GL_FLOAT_RGBA_NV 0x8883
++#define GL_FLOAT_R16_NV 0x8884
++#define GL_FLOAT_R32_NV 0x8885
++#define GL_FLOAT_RG16_NV 0x8886
++#define GL_FLOAT_RG32_NV 0x8887
++#define GL_FLOAT_RGB16_NV 0x8888
++#define GL_FLOAT_RGB32_NV 0x8889
++#define GL_FLOAT_RGBA16_NV 0x888A
++#define GL_FLOAT_RGBA32_NV 0x888B
++#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
++#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
++#define GL_FLOAT_RGBA_MODE_NV 0x888E
++#endif
++
++#ifndef GL_NV_fragment_program
++#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
++#define GL_FRAGMENT_PROGRAM_NV 0x8870
++#define GL_MAX_TEXTURE_COORDS_NV 0x8871
++#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
++#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
++#define GL_PROGRAM_ERROR_STRING_NV 0x8874
++#endif
++
++#ifndef GL_NV_half_float
++#define GL_HALF_FLOAT_NV 0x140B
++#endif
++
++#ifndef GL_NV_pixel_data_range
++#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
++#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
++#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
++#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
++#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
++#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
++#endif
++
++#ifndef GL_NV_primitive_restart
++#define GL_PRIMITIVE_RESTART_NV 0x8558
++#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
++#endif
++
++#ifndef GL_NV_texture_expand_normal
++#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
++#endif
++
++#ifndef GL_NV_vertex_program2
++#endif
++
++#ifndef GL_ATI_map_object_buffer
++#endif
++
++#ifndef GL_ATI_separate_stencil
++#define GL_STENCIL_BACK_FUNC_ATI 0x8800
++#define GL_STENCIL_BACK_FAIL_ATI 0x8801
++#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
++#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
++#endif
++
++#ifndef GL_ATI_vertex_attrib_array_object
++#endif
++
++#ifndef GL_OES_read_format
++#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
++#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
++#endif
++
++#ifndef GL_EXT_depth_bounds_test
++#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
++#define GL_DEPTH_BOUNDS_EXT 0x8891
++#endif
++
++#ifndef GL_EXT_texture_mirror_clamp
++#define GL_MIRROR_CLAMP_EXT 0x8742
++#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
++#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
++#endif
++
++#ifndef GL_EXT_blend_equation_separate
++#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
++#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
++#endif
++
++#ifndef GL_MESA_pack_invert
++#define GL_PACK_INVERT_MESA 0x8758
++#endif
++
++#ifndef GL_MESA_ycbcr_texture
++#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
++#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
++#define GL_YCBCR_MESA 0x8757
++#endif
++
++#ifndef GL_EXT_pixel_buffer_object
++#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
++#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
++#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
++#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
++#endif
++
++#ifndef GL_NV_fragment_program_option
++#endif
++
++#ifndef GL_NV_fragment_program2
++#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
++#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
++#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
++#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
++#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
++#endif
++
++#ifndef GL_NV_vertex_program2_option
++/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
++/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
++#endif
++
++#ifndef GL_NV_vertex_program3
++/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
++#endif
++
++#ifndef GL_EXT_framebuffer_object
++#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
++#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
++#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
++#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
++#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
++#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
++#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
++#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
++#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
++#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
++#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
++#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
++#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
++#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
++#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
++#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
++#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
++#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
++#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
++#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
++#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
++#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
++#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
++#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
++#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
++#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
++#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
++#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
++#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
++#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
++#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
++#define GL_FRAMEBUFFER_EXT 0x8D40
++#define GL_RENDERBUFFER_EXT 0x8D41
++#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
++#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
++#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
++#define GL_STENCIL_INDEX1_EXT 0x8D46
++#define GL_STENCIL_INDEX4_EXT 0x8D47
++#define GL_STENCIL_INDEX8_EXT 0x8D48
++#define GL_STENCIL_INDEX16_EXT 0x8D49
++#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
++#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
++#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
++#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
++#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
++#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
++#endif
++
++#ifndef GL_GREMEDY_string_marker
++#endif
++
++#ifndef GL_EXT_packed_depth_stencil
++#define GL_DEPTH_STENCIL_EXT 0x84F9
++#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
++#define GL_DEPTH24_STENCIL8_EXT 0x88F0
++#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
++#endif
++
++#ifndef GL_EXT_stencil_clear_tag
++#define GL_STENCIL_TAG_BITS_EXT 0x88F2
++#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
++#endif
++
++#ifndef GL_EXT_texture_sRGB
++#define GL_SRGB_EXT 0x8C40
++#define GL_SRGB8_EXT 0x8C41
++#define GL_SRGB_ALPHA_EXT 0x8C42
++#define GL_SRGB8_ALPHA8_EXT 0x8C43
++#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
++#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
++#define GL_SLUMINANCE_EXT 0x8C46
++#define GL_SLUMINANCE8_EXT 0x8C47
++#define GL_COMPRESSED_SRGB_EXT 0x8C48
++#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
++#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
++#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
++#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
++#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
++#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
++#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
++#endif
++
++#ifndef GL_EXT_framebuffer_blit
++#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
++#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
++#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
++#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
++#endif
++
++#ifndef GL_EXT_framebuffer_multisample
++#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
++#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
++#define GL_MAX_SAMPLES_EXT 0x8D57
++#endif
++
++#ifndef GL_MESAX_texture_stack
++#define GL_TEXTURE_1D_STACK_MESAX 0x8759
++#define GL_TEXTURE_2D_STACK_MESAX 0x875A
++#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
++#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
++#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
++#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
++#endif
++
++#ifndef GL_EXT_timer_query
++#define GL_TIME_ELAPSED_EXT 0x88BF
++#endif
++
++#ifndef GL_EXT_gpu_program_parameters
++#endif
++
++#ifndef GL_APPLE_flush_buffer_range
++#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
++#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
++#endif
++
++#ifndef GL_NV_gpu_program4
++#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
++#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
++#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
++#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
++#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
++#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
++#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
++#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
++#endif
++
++#ifndef GL_NV_geometry_program4
++#define GL_LINES_ADJACENCY_EXT 0x000A
++#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
++#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
++#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
++#define GL_GEOMETRY_PROGRAM_NV 0x8C26
++#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
++#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
++#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
++#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
++#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
++#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
++#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
++#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
++#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
++#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
++#endif
++
++#ifndef GL_EXT_geometry_shader4
++#define GL_GEOMETRY_SHADER_EXT 0x8DD9
++/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
++/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
++/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
++/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
++#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
++#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
++#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
++#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
++#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
++#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
++/* reuse GL_LINES_ADJACENCY_EXT */
++/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
++/* reuse GL_TRIANGLES_ADJACENCY_EXT */
++/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
++/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
++/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
++/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
++/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
++/* reuse GL_PROGRAM_POINT_SIZE_EXT */
++#endif
++
++#ifndef GL_NV_vertex_program4
++#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
++#endif
++
++#ifndef GL_EXT_gpu_shader4
++#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
++#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
++#define GL_SAMPLER_BUFFER_EXT 0x8DC2
++#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
++#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
++#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
++#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
++#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
++#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
++#define GL_INT_SAMPLER_1D_EXT 0x8DC9
++#define GL_INT_SAMPLER_2D_EXT 0x8DCA
++#define GL_INT_SAMPLER_3D_EXT 0x8DCB
++#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
++#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
++#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
++#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
++#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
++#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
++#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
++#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
++#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
++#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
++#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
++#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
++#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
++#endif
++
++#ifndef GL_EXT_draw_instanced
++#endif
++
++#ifndef GL_EXT_packed_float
++#define GL_R11F_G11F_B10F_EXT 0x8C3A
++#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
++#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
++#endif
++
++#ifndef GL_EXT_texture_array
++#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
++#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
++#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
++#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
++#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
++#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
++#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
++#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
++/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
++#endif
++
++#ifndef GL_EXT_texture_buffer_object
++#define GL_TEXTURE_BUFFER_EXT 0x8C2A
++#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
++#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
++#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
++#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
++#endif
++
++#ifndef GL_EXT_texture_compression_latc
++#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
++#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
++#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
++#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
++#endif
++
++#ifndef GL_EXT_texture_compression_rgtc
++#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
++#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
++#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
++#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
++#endif
++
++#ifndef GL_EXT_texture_shared_exponent
++#define GL_RGB9_E5_EXT 0x8C3D
++#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
++#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
++#endif
++
++#ifndef GL_NV_depth_buffer_float
++#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
++#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
++#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
++#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
++#endif
++
++#ifndef GL_NV_fragment_program4
++#endif
++
++#ifndef GL_NV_framebuffer_multisample_coverage
++#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
++#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
++#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
++#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
++#endif
++
++#ifndef GL_EXT_framebuffer_sRGB
++#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
++#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
++#endif
++
++#ifndef GL_NV_geometry_shader4
++#endif
++
++#ifndef GL_NV_parameter_buffer_object
++#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
++#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
++#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
++#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
++#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
++#endif
++
++#ifndef GL_EXT_draw_buffers2
++#endif
++
++#ifndef GL_NV_transform_feedback
++#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
++#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
++#define GL_TEXTURE_COORD_NV 0x8C79
++#define GL_CLIP_DISTANCE_NV 0x8C7A
++#define GL_VERTEX_ID_NV 0x8C7B
++#define GL_PRIMITIVE_ID_NV 0x8C7C
++#define GL_GENERIC_ATTRIB_NV 0x8C7D
++#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
++#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
++#define GL_ACTIVE_VARYINGS_NV 0x8C81
++#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
++#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
++#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
++#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
++#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
++#define GL_PRIMITIVES_GENERATED_NV 0x8C87
++#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
++#define GL_RASTERIZER_DISCARD_NV 0x8C89
++#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
++#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
++#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
++#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
++#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
++#endif
++
++#ifndef GL_EXT_bindable_uniform
++#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
++#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
++#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
++#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
++#define GL_UNIFORM_BUFFER_EXT 0x8DEE
++#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
++#endif
++
++#ifndef GL_EXT_texture_integer
++#define GL_RGBA32UI_EXT 0x8D70
++#define GL_RGB32UI_EXT 0x8D71
++#define GL_ALPHA32UI_EXT 0x8D72
++#define GL_INTENSITY32UI_EXT 0x8D73
++#define GL_LUMINANCE32UI_EXT 0x8D74
++#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
++#define GL_RGBA16UI_EXT 0x8D76
++#define GL_RGB16UI_EXT 0x8D77
++#define GL_ALPHA16UI_EXT 0x8D78
++#define GL_INTENSITY16UI_EXT 0x8D79
++#define GL_LUMINANCE16UI_EXT 0x8D7A
++#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
++#define GL_RGBA8UI_EXT 0x8D7C
++#define GL_RGB8UI_EXT 0x8D7D
++#define GL_ALPHA8UI_EXT 0x8D7E
++#define GL_INTENSITY8UI_EXT 0x8D7F
++#define GL_LUMINANCE8UI_EXT 0x8D80
++#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
++#define GL_RGBA32I_EXT 0x8D82
++#define GL_RGB32I_EXT 0x8D83
++#define GL_ALPHA32I_EXT 0x8D84
++#define GL_INTENSITY32I_EXT 0x8D85
++#define GL_LUMINANCE32I_EXT 0x8D86
++#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
++#define GL_RGBA16I_EXT 0x8D88
++#define GL_RGB16I_EXT 0x8D89
++#define GL_ALPHA16I_EXT 0x8D8A
++#define GL_INTENSITY16I_EXT 0x8D8B
++#define GL_LUMINANCE16I_EXT 0x8D8C
++#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
++#define GL_RGBA8I_EXT 0x8D8E
++#define GL_RGB8I_EXT 0x8D8F
++#define GL_ALPHA8I_EXT 0x8D90
++#define GL_INTENSITY8I_EXT 0x8D91
++#define GL_LUMINANCE8I_EXT 0x8D92
++#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
++#define GL_RED_INTEGER_EXT 0x8D94
++#define GL_GREEN_INTEGER_EXT 0x8D95
++#define GL_BLUE_INTEGER_EXT 0x8D96
++#define GL_ALPHA_INTEGER_EXT 0x8D97
++#define GL_RGB_INTEGER_EXT 0x8D98
++#define GL_RGBA_INTEGER_EXT 0x8D99
++#define GL_BGR_INTEGER_EXT 0x8D9A
++#define GL_BGRA_INTEGER_EXT 0x8D9B
++#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
++#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
++#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
++#endif
++
++
++/*************************************************************/
++
++#include <stddef.h>
++#ifndef GL_VERSION_2_0
++/* GL type for program/shader text */
++typedef char GLchar; /* native character */
++#endif
++
++#ifndef GL_VERSION_1_5
++/* GL types for handling large vertex buffer objects */
++typedef ptrdiff_t GLintptr;
++typedef ptrdiff_t GLsizeiptr;
++#endif
++
++#ifndef GL_ARB_vertex_buffer_object
++/* GL types for handling large vertex buffer objects */
++typedef ptrdiff_t GLintptrARB;
++typedef ptrdiff_t GLsizeiptrARB;
++#endif
++
++#ifndef GL_ARB_shader_objects
++/* GL types for handling shader object handles and program/shader text */
++typedef char GLcharARB; /* native character */
++typedef unsigned int GLhandleARB; /* shader object handle */
++#endif
++
++/* GL types for "half" precision (s10e5) float data in host memory */
++#ifndef GL_ARB_half_float_pixel
++typedef unsigned short GLhalfARB;
++#endif
++
++#ifndef GL_NV_half_float
++typedef unsigned short GLhalfNV;
++#endif
++
++#ifndef GLEXT_64_TYPES_DEFINED
++/* This code block is duplicated in glext.h, so must be protected */
++#define GLEXT_64_TYPES_DEFINED
++/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
++/* (as used in the GL_EXT_timer_query extension). */
++#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
++#include <inttypes.h>
++#elif defined(__sun__)
++#include <inttypes.h>
++#if defined(__STDC__)
++#if defined(__arch64__)
++typedef long int int64_t;
++typedef unsigned long int uint64_t;
++#else
++typedef long long int int64_t;
++typedef unsigned long long int uint64_t;
++#endif /* __arch64__ */
++#endif /* __STDC__ */
++#elif defined( __VMS )
++#include <inttypes.h>
++#elif defined(__SCO__) || defined(__USLC__)
++#include <stdint.h>
++#elif defined(__UNIXOS2__) || defined(__SOL64__)
++typedef long int int32_t;
++typedef long long int int64_t;
++typedef unsigned long long int uint64_t;
++#elif defined(_WIN32) && defined(__GNUC__)
++#include <stdint.h>
++#elif defined(_WIN32)
++typedef __int32 int32_t;
++typedef __int64 int64_t;
++typedef unsigned __int64 uint64_t;
++#else
++#include <inttypes.h> /* Fallback option */
++#endif
++#endif
++
++#ifndef GL_EXT_timer_query
++typedef int64_t GLint64EXT;
++typedef uint64_t GLuint64EXT;
++#endif
++
++#ifndef GL_VERSION_1_2
++#define GL_VERSION_1_2 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
++GLAPI void APIENTRY glBlendEquation (GLenum);
++GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
++GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
++GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
++GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
++GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
++GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
++GLAPI void APIENTRY glResetHistogram (GLenum);
++GLAPI void APIENTRY glResetMinmax (GLenum);
++GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
++typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
++typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
++typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
++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);
++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);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
++#endif
++
++#ifndef GL_VERSION_1_3
++#define GL_VERSION_1_3 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glActiveTexture (GLenum);
++GLAPI void APIENTRY glClientActiveTexture (GLenum);
++GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
++GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
++GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
++GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
++GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
++GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
++GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
++GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
++GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
++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);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
++#endif
++
++#ifndef GL_VERSION_1_4
++#define GL_VERSION_1_4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glFogCoordf (GLfloat);
++GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
++GLAPI void APIENTRY glFogCoordd (GLdouble);
++GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
++GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
++GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
++GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
++GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
++GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
++GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
++GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
++GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
++GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
++GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
++GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
++GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
++GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
++GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
++GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
++GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
++GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
++GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
++GLAPI void APIENTRY glWindowPos2iv (const GLint *);
++GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
++GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
++GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
++GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
++GLAPI void APIENTRY glWindowPos3iv (const GLint *);
++GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
++typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
++typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
++typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
++typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
++typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
++typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
++#endif
++
++#ifndef GL_VERSION_1_5
++#define GL_VERSION_1_5 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
++GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
++GLAPI GLboolean APIENTRY glIsQuery (GLuint);
++GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
++GLAPI void APIENTRY glEndQuery (GLenum);
++GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
++GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
++GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
++GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
++GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
++GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
++GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
++GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
++typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
++typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
++typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
++typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
++typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
++typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
++typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
++typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
++typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
++typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
++#endif
++
++#ifndef GL_VERSION_2_0
++#define GL_VERSION_2_0 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
++GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
++GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
++GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
++GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
++GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
++GLAPI void APIENTRY glCompileShader (GLuint);
++GLAPI GLuint APIENTRY glCreateProgram (void);
++GLAPI GLuint APIENTRY glCreateShader (GLenum);
++GLAPI void APIENTRY glDeleteProgram (GLuint);
++GLAPI void APIENTRY glDeleteShader (GLuint);
++GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
++GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
++GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
++GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
++GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
++GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
++GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
++GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
++GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
++GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
++GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
++GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
++GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
++GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
++GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
++GLAPI GLboolean APIENTRY glIsProgram (GLuint);
++GLAPI GLboolean APIENTRY glIsShader (GLuint);
++GLAPI void APIENTRY glLinkProgram (GLuint);
++GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
++GLAPI void APIENTRY glUseProgram (GLuint);
++GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
++GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform1i (GLint, GLint);
++GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glValidateProgram (GLuint);
++GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
++GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
++GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
++GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
++typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
++typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
++typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
++typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
++typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
++typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
++typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
++typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
++typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
++typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
++typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
++typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
++typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
++typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
++typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
++typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
++typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
++typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
++typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
++typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
++typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
++typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
++typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
++typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
++typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
++typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
++typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
++typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
++typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
++typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
++typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
++typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
++typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
++typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
++typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
++typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
++typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_VERSION_2_1
++#define GL_VERSION_2_1 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++#endif
++
++#ifndef GL_ARB_multitexture
++#define GL_ARB_multitexture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glActiveTextureARB (GLenum);
++GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
++GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
++GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
++GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
++#endif
++
++#ifndef GL_ARB_transpose_matrix
++#define GL_ARB_transpose_matrix 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
++GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
++GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
++GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
++#endif
++
++#ifndef GL_ARB_multisample
++#define GL_ARB_multisample 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
++#endif
++
++#ifndef GL_ARB_texture_env_add
++#define GL_ARB_texture_env_add 1
++#endif
++
++#ifndef GL_ARB_texture_cube_map
++#define GL_ARB_texture_cube_map 1
++#endif
++
++#ifndef GL_ARB_texture_compression
++#define GL_ARB_texture_compression 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
++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);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
++#endif
++
++#ifndef GL_ARB_texture_border_clamp
++#define GL_ARB_texture_border_clamp 1
++#endif
++
++#ifndef GL_ARB_point_parameters
++#define GL_ARB_point_parameters 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
++GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
++#endif
++
++#ifndef GL_ARB_vertex_blend
++#define GL_ARB_vertex_blend 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
++GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
++GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
++GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
++GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
++GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
++GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
++GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
++GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glVertexBlendARB (GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
++typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
++typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
++typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
++typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
++typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
++typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
++typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
++typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
++#endif
++
++#ifndef GL_ARB_matrix_palette
++#define GL_ARB_matrix_palette 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
++GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
++GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
++GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
++GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
++typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
++typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
++typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
++typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_ARB_texture_env_combine
++#define GL_ARB_texture_env_combine 1
++#endif
++
++#ifndef GL_ARB_texture_env_crossbar
++#define GL_ARB_texture_env_crossbar 1
++#endif
++
++#ifndef GL_ARB_texture_env_dot3
++#define GL_ARB_texture_env_dot3 1
++#endif
++
++#ifndef GL_ARB_texture_mirrored_repeat
++#define GL_ARB_texture_mirrored_repeat 1
++#endif
++
++#ifndef GL_ARB_depth_texture
++#define GL_ARB_depth_texture 1
++#endif
++
++#ifndef GL_ARB_shadow
++#define GL_ARB_shadow 1
++#endif
++
++#ifndef GL_ARB_shadow_ambient
++#define GL_ARB_shadow_ambient 1
++#endif
++
++#ifndef GL_ARB_window_pos
++#define GL_ARB_window_pos 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
++GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
++GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
++GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
++GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
++GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
++GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
++GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
++GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
++GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
++#endif
++
++#ifndef GL_ARB_vertex_program
++#define GL_ARB_vertex_program 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
++GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
++GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
++GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
++GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
++GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
++GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
++GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
++GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
++GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
++GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
++GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
++GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
++GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
++GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
++GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
++GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
++typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
++typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
++typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
++typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
++typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
++typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
++#endif
++
++#ifndef GL_ARB_fragment_program
++#define GL_ARB_fragment_program 1
++/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
++#endif
++
++#ifndef GL_ARB_vertex_buffer_object
++#define GL_ARB_vertex_buffer_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
++GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
++GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
++GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
++GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
++GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
++GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
++typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
++typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
++typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
++typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
++typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
++typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
++#endif
++
++#ifndef GL_ARB_occlusion_query
++#define GL_ARB_occlusion_query 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
++GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
++GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
++GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
++GLAPI void APIENTRY glEndQueryARB (GLenum);
++GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
++typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
++typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
++typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
++#endif
++
++#ifndef GL_ARB_shader_objects
++#define GL_ARB_shader_objects 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
++GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
++GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
++GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
++GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
++GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
++GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
++GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
++GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
++GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
++GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
++GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
++GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
++GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
++GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
++GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
++GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
++GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
++GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
++GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
++GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
++typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
++typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
++typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
++typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
++typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
++typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
++typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
++typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
++typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
++typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
++typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
++typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
++typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
++typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
++typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
++typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
++typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
++typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
++typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
++typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
++typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
++typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
++typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
++typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
++#endif
++
++#ifndef GL_ARB_vertex_shader
++#define GL_ARB_vertex_shader 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
++GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
++GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
++typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
++typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
++#endif
++
++#ifndef GL_ARB_fragment_shader
++#define GL_ARB_fragment_shader 1
++#endif
++
++#ifndef GL_ARB_shading_language_100
++#define GL_ARB_shading_language_100 1
++#endif
++
++#ifndef GL_ARB_texture_non_power_of_two
++#define GL_ARB_texture_non_power_of_two 1
++#endif
++
++#ifndef GL_ARB_point_sprite
++#define GL_ARB_point_sprite 1
++#endif
++
++#ifndef GL_ARB_fragment_program_shadow
++#define GL_ARB_fragment_program_shadow 1
++#endif
++
++#ifndef GL_ARB_draw_buffers
++#define GL_ARB_draw_buffers 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
++#endif
++
++#ifndef GL_ARB_texture_rectangle
++#define GL_ARB_texture_rectangle 1
++#endif
++
++#ifndef GL_ARB_color_buffer_float
++#define GL_ARB_color_buffer_float 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
++#endif
++
++#ifndef GL_ARB_half_float_pixel
++#define GL_ARB_half_float_pixel 1
++#endif
++
++#ifndef GL_ARB_texture_float
++#define GL_ARB_texture_float 1
++#endif
++
++#ifndef GL_ARB_pixel_buffer_object
++#define GL_ARB_pixel_buffer_object 1
++#endif
++
++#ifndef GL_EXT_abgr
++#define GL_EXT_abgr 1
++#endif
++
++#ifndef GL_EXT_blend_color
++#define GL_EXT_blend_color 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
++#endif
++
++#ifndef GL_EXT_polygon_offset
++#define GL_EXT_polygon_offset 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
++#endif
++
++#ifndef GL_EXT_texture
++#define GL_EXT_texture 1
++#endif
++
++#ifndef GL_EXT_texture3D
++#define GL_EXT_texture3D 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++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);
++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);
++#endif
++
++#ifndef GL_SGIS_texture_filter4
++#define GL_SGIS_texture_filter4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
++typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
++#endif
++
++#ifndef GL_EXT_subtexture
++#define GL_EXT_subtexture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
++typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
++#endif
++
++#ifndef GL_EXT_copy_texture
++#define GL_EXT_copy_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
++GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
++GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
++GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
++typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
++#endif
++
++#ifndef GL_EXT_histogram
++#define GL_EXT_histogram 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
++GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
++GLAPI void APIENTRY glResetHistogramEXT (GLenum);
++GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
++#endif
++
++#ifndef GL_EXT_convolution
++#define GL_EXT_convolution 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
++GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
++GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
++typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
++#endif
++
++#ifndef GL_SGI_color_matrix
++#define GL_SGI_color_matrix 1
++#endif
++
++#ifndef GL_SGI_color_table
++#define GL_SGI_color_table 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
++#endif
++
++#ifndef GL_SGIX_pixel_texture
++#define GL_SGIX_pixel_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
++#endif
++
++#ifndef GL_SGIS_pixel_texture
++#define GL_SGIS_pixel_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
++GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
++GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
++GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
++GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_SGIS_texture4D
++#define GL_SGIS_texture4D 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++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);
++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);
++#endif
++
++#ifndef GL_SGI_texture_color_table
++#define GL_SGI_texture_color_table 1
++#endif
++
++#ifndef GL_EXT_cmyka
++#define GL_EXT_cmyka 1
++#endif
++
++#ifndef GL_EXT_texture_object
++#define GL_EXT_texture_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
++GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
++GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
++typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
++typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
++typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
++typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
++typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
++#endif
++
++#ifndef GL_SGIS_detail_texture
++#define GL_SGIS_detail_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
++typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
++#endif
++
++#ifndef GL_SGIS_sharpen_texture
++#define GL_SGIS_sharpen_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
++typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
++#endif
++
++#ifndef GL_EXT_packed_pixels
++#define GL_EXT_packed_pixels 1
++#endif
++
++#ifndef GL_SGIS_texture_lod
++#define GL_SGIS_texture_lod 1
++#endif
++
++#ifndef GL_SGIS_multisample
++#define GL_SGIS_multisample 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
++GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
++typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
++#endif
++
++#ifndef GL_EXT_rescale_normal
++#define GL_EXT_rescale_normal 1
++#endif
++
++#ifndef GL_EXT_vertex_array
++#define GL_EXT_vertex_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glArrayElementEXT (GLint);
++GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
++GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
++GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
++GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
++typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
++typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
++typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
++typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++#endif
++
++#ifndef GL_EXT_misc_attribute
++#define GL_EXT_misc_attribute 1
++#endif
++
++#ifndef GL_SGIS_generate_mipmap
++#define GL_SGIS_generate_mipmap 1
++#endif
++
++#ifndef GL_SGIX_clipmap
++#define GL_SGIX_clipmap 1
++#endif
++
++#ifndef GL_SGIX_shadow
++#define GL_SGIX_shadow 1
++#endif
++
++#ifndef GL_SGIS_texture_edge_clamp
++#define GL_SGIS_texture_edge_clamp 1
++#endif
++
++#ifndef GL_SGIS_texture_border_clamp
++#define GL_SGIS_texture_border_clamp 1
++#endif
++
++#ifndef GL_EXT_blend_minmax
++#define GL_EXT_blend_minmax 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendEquationEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
++#endif
++
++#ifndef GL_EXT_blend_subtract
++#define GL_EXT_blend_subtract 1
++#endif
++
++#ifndef GL_EXT_blend_logic_op
++#define GL_EXT_blend_logic_op 1
++#endif
++
++#ifndef GL_SGIX_interlace
++#define GL_SGIX_interlace 1
++#endif
++
++#ifndef GL_SGIX_pixel_tiles
++#define GL_SGIX_pixel_tiles 1
++#endif
++
++#ifndef GL_SGIX_texture_select
++#define GL_SGIX_texture_select 1
++#endif
++
++#ifndef GL_SGIX_sprite
++#define GL_SGIX_sprite 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
++GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
++GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
++GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
++#endif
++
++#ifndef GL_SGIX_texture_multi_buffer
++#define GL_SGIX_texture_multi_buffer 1
++#endif
++
++#ifndef GL_EXT_point_parameters
++#define GL_EXT_point_parameters 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
++GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
++/* ERO Begin */
++GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
++GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
++/* ERO end */
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
++#endif
++
++#ifndef GL_SGIS_point_parameters
++#define GL_SGIS_point_parameters 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
++GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
++#endif
++
++#ifndef GL_SGIX_instruments
++#define GL_SGIX_instruments 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
++GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
++GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
++GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
++GLAPI void APIENTRY glStartInstrumentsSGIX (void);
++GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
++typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
++typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
++typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
++typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
++typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
++#endif
++
++#ifndef GL_SGIX_texture_scale_bias
++#define GL_SGIX_texture_scale_bias 1
++#endif
++
++#ifndef GL_SGIX_framezoom
++#define GL_SGIX_framezoom 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFrameZoomSGIX (GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
++#endif
++
++#ifndef GL_SGIX_tag_sample_buffer
++#define GL_SGIX_tag_sample_buffer 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTagSampleBufferSGIX (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
++#endif
++
++#ifndef GL_SGIX_polynomial_ffd
++#define GL_SGIX_polynomial_ffd 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
++GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
++GLAPI void APIENTRY glDeformSGIX (GLbitfield);
++GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
++#endif /* GL_GLEXT_PROTOTYPES */
++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);
++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);
++typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
++typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
++#endif
++
++#ifndef GL_SGIX_reference_plane
++#define GL_SGIX_reference_plane 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
++#endif
++
++#ifndef GL_SGIX_flush_raster
++#define GL_SGIX_flush_raster 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFlushRasterSGIX (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
++#endif
++
++#ifndef GL_SGIX_depth_texture
++#define GL_SGIX_depth_texture 1
++#endif
++
++#ifndef GL_SGIS_fog_function
++#define GL_SGIS_fog_function 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
++GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
++typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
++#endif
++
++#ifndef GL_SGIX_fog_offset
++#define GL_SGIX_fog_offset 1
++#endif
++
++#ifndef GL_HP_image_transform
++#define GL_HP_image_transform 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_HP_convolution_border_modes
++#define GL_HP_convolution_border_modes 1
++#endif
++
++#ifndef GL_SGIX_texture_add_env
++#define GL_SGIX_texture_add_env 1
++#endif
++
++#ifndef GL_EXT_color_subtable
++#define GL_EXT_color_subtable 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
++#endif
++
++#ifndef GL_PGI_vertex_hints
++#define GL_PGI_vertex_hints 1
++#endif
++
++#ifndef GL_PGI_misc_hints
++#define GL_PGI_misc_hints 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glHintPGI (GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
++#endif
++
++#ifndef GL_EXT_paletted_texture
++#define GL_EXT_paletted_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_EXT_clip_volume_hint
++#define GL_EXT_clip_volume_hint 1
++#endif
++
++#ifndef GL_SGIX_list_priority
++#define GL_SGIX_list_priority 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
++GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
++GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
++GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
++#endif
++
++#ifndef GL_SGIX_ir_instrument1
++#define GL_SGIX_ir_instrument1 1
++#endif
++
++#ifndef GL_SGIX_calligraphic_fragment
++#define GL_SGIX_calligraphic_fragment 1
++#endif
++
++#ifndef GL_SGIX_texture_lod_bias
++#define GL_SGIX_texture_lod_bias 1
++#endif
++
++#ifndef GL_SGIX_shadow_ambient
++#define GL_SGIX_shadow_ambient 1
++#endif
++
++#ifndef GL_EXT_index_texture
++#define GL_EXT_index_texture 1
++#endif
++
++#ifndef GL_EXT_index_material
++#define GL_EXT_index_material 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
++#endif
++
++#ifndef GL_EXT_index_func
++#define GL_EXT_index_func 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
++#endif
++
++#ifndef GL_EXT_index_array_formats
++#define GL_EXT_index_array_formats 1
++#endif
++
++#ifndef GL_EXT_compiled_vertex_array
++#define GL_EXT_compiled_vertex_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
++GLAPI void APIENTRY glUnlockArraysEXT (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
++typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
++#endif
++
++#ifndef GL_EXT_cull_vertex
++#define GL_EXT_cull_vertex 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
++GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_SGIX_ycrcb
++#define GL_SGIX_ycrcb 1
++#endif
++
++#ifndef GL_SGIX_fragment_lighting
++#define GL_SGIX_fragment_lighting 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
++GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
++GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
++GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
++GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
++GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
++#endif
++
++#ifndef GL_IBM_rasterpos_clip
++#define GL_IBM_rasterpos_clip 1
++#endif
++
++#ifndef GL_HP_texture_lighting
++#define GL_HP_texture_lighting 1
++#endif
++
++#ifndef GL_EXT_draw_range_elements
++#define GL_EXT_draw_range_elements 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
++#endif
++
++#ifndef GL_WIN_phong_shading
++#define GL_WIN_phong_shading 1
++#endif
++
++#ifndef GL_WIN_specular_fog
++#define GL_WIN_specular_fog 1
++#endif
++
++#ifndef GL_EXT_light_texture
++#define GL_EXT_light_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glApplyTextureEXT (GLenum);
++GLAPI void APIENTRY glTextureLightEXT (GLenum);
++GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
++typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
++typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
++#endif
++
++#ifndef GL_SGIX_blend_alpha_minmax
++#define GL_SGIX_blend_alpha_minmax 1
++#endif
++
++#ifndef GL_EXT_bgra
++#define GL_EXT_bgra 1
++#endif
++
++#ifndef GL_SGIX_async
++#define GL_SGIX_async 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
++GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
++GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
++GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
++GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
++GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
++typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
++typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
++typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
++typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
++typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
++#endif
++
++#ifndef GL_SGIX_async_pixel
++#define GL_SGIX_async_pixel 1
++#endif
++
++#ifndef GL_SGIX_async_histogram
++#define GL_SGIX_async_histogram 1
++#endif
++
++#ifndef GL_INTEL_parallel_arrays
++#define GL_INTEL_parallel_arrays 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
++GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
++GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
++GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
++typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
++typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
++typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
++#endif
++
++#ifndef GL_HP_occlusion_test
++#define GL_HP_occlusion_test 1
++#endif
++
++#ifndef GL_EXT_pixel_transform
++#define GL_EXT_pixel_transform 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
++/* ERO Begin */
++GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
++/* ERO End */
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
++/* ERO Begin */
++typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++/* ERO End */
++#endif
++
++#ifndef GL_EXT_pixel_transform_color_table
++#define GL_EXT_pixel_transform_color_table 1
++#endif
++
++#ifndef GL_EXT_shared_texture_palette
++#define GL_EXT_shared_texture_palette 1
++#endif
++
++#ifndef GL_EXT_separate_specular_color
++#define GL_EXT_separate_specular_color 1
++#endif
++
++#ifndef GL_EXT_secondary_color
++#define GL_EXT_secondary_color 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
++GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
++GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
++GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
++GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
++GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
++GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
++GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
++GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
++GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
++GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_EXT_texture_perturb_normal
++#define GL_EXT_texture_perturb_normal 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTextureNormalEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
++#endif
++
++#ifndef GL_EXT_multi_draw_arrays
++#define GL_EXT_multi_draw_arrays 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
++GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
++typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
++#endif
++
++#ifndef GL_EXT_fog_coord
++#define GL_EXT_fog_coord 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
++GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
++GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
++GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
++GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
++typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
++typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
++typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
++typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_REND_screen_coordinates
++#define GL_REND_screen_coordinates 1
++#endif
++
++#ifndef GL_EXT_coordinate_frame
++#define GL_EXT_coordinate_frame 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
++GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
++GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
++GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
++GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
++GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
++GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
++GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
++GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
++GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
++GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
++GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
++GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
++typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
++typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
++typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
++typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
++typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
++typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
++typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
++typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
++typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
++typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
++typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
++typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_EXT_texture_env_combine
++#define GL_EXT_texture_env_combine 1
++#endif
++
++#ifndef GL_APPLE_specular_vector
++#define GL_APPLE_specular_vector 1
++#endif
++
++#ifndef GL_APPLE_transform_hint
++#define GL_APPLE_transform_hint 1
++#endif
++
++#ifndef GL_SGIX_fog_scale
++#define GL_SGIX_fog_scale 1
++#endif
++
++#ifndef GL_SUNX_constant_data
++#define GL_SUNX_constant_data 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFinishTextureSUNX (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
++#endif
++
++#ifndef GL_SUN_global_alpha
++#define GL_SUN_global_alpha 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
++GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
++GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
++GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
++GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
++GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
++GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
++GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
++#endif
++
++#ifndef GL_SUN_triangle_list
++#define GL_SUN_triangle_list 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
++GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
++GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
++GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
++GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
++GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
++GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
++#endif
++
++#ifndef GL_SUN_vertex
++#define GL_SUN_vertex 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
++GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
++typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
++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);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
++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);
++typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
++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);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
++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);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
++#endif
++
++#ifndef GL_EXT_blend_func_separate
++#define GL_EXT_blend_func_separate 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
++#endif
++
++#ifndef GL_INGR_blend_func_separate
++#define GL_INGR_blend_func_separate 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
++#endif
++
++#ifndef GL_INGR_color_clamp
++#define GL_INGR_color_clamp 1
++#endif
++
++#ifndef GL_INGR_interlace_read
++#define GL_INGR_interlace_read 1
++#endif
++
++#ifndef GL_EXT_stencil_wrap
++#define GL_EXT_stencil_wrap 1
++#endif
++
++#ifndef GL_EXT_422_pixels
++#define GL_EXT_422_pixels 1
++#endif
++
++#ifndef GL_NV_texgen_reflection
++#define GL_NV_texgen_reflection 1
++#endif
++
++#ifndef GL_SUN_convolution_border_modes
++#define GL_SUN_convolution_border_modes 1
++#endif
++
++#ifndef GL_EXT_texture_env_add
++#define GL_EXT_texture_env_add 1
++#endif
++
++#ifndef GL_EXT_texture_lod_bias
++#define GL_EXT_texture_lod_bias 1
++#endif
++
++#ifndef GL_EXT_texture_filter_anisotropic
++#define GL_EXT_texture_filter_anisotropic 1
++#endif
++
++#ifndef GL_EXT_vertex_weighting
++#define GL_EXT_vertex_weighting 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
++GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
++GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_NV_light_max_exponent
++#define GL_NV_light_max_exponent 1
++#endif
++
++#ifndef GL_NV_vertex_array_range
++#define GL_NV_vertex_array_range 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
++GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
++typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
++#endif
++
++#ifndef GL_NV_register_combiners
++#define GL_NV_register_combiners 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
++GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
++GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
++GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
++GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
++GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
++typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
++typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
++typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
++#endif
++
++#ifndef GL_NV_fog_distance
++#define GL_NV_fog_distance 1
++#endif
++
++#ifndef GL_NV_texgen_emboss
++#define GL_NV_texgen_emboss 1
++#endif
++
++#ifndef GL_NV_blend_square
++#define GL_NV_blend_square 1
++#endif
++
++#ifndef GL_NV_texture_env_combine4
++#define GL_NV_texture_env_combine4 1
++#endif
++
++#ifndef GL_MESA_resize_buffers
++#define GL_MESA_resize_buffers 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glResizeBuffersMESA (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
++#endif
++
++#ifndef GL_MESA_window_pos
++#define GL_MESA_window_pos 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
++GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
++GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
++GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
++GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
++GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
++GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
++GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
++GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
++GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
++GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
++GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
++GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
++GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
++#endif
++
++#ifndef GL_IBM_cull_vertex
++#define GL_IBM_cull_vertex 1
++#endif
++
++#ifndef GL_IBM_multimode_draw_arrays
++#define GL_IBM_multimode_draw_arrays 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
++GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
++typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
++#endif
++
++#ifndef GL_IBM_vertex_array_lists
++#define GL_IBM_vertex_array_lists 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
++GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++#endif
++
++#ifndef GL_SGIX_subsample
++#define GL_SGIX_subsample 1
++#endif
++
++#ifndef GL_SGIX_ycrcba
++#define GL_SGIX_ycrcba 1
++#endif
++
++#ifndef GL_SGIX_ycrcb_subsample
++#define GL_SGIX_ycrcb_subsample 1
++#endif
++
++#ifndef GL_SGIX_depth_pass_instrument
++#define GL_SGIX_depth_pass_instrument 1
++#endif
++
++#ifndef GL_3DFX_texture_compression_FXT1
++#define GL_3DFX_texture_compression_FXT1 1
++#endif
++
++#ifndef GL_3DFX_multisample
++#define GL_3DFX_multisample 1
++#endif
++
++#ifndef GL_3DFX_tbuffer
++#define GL_3DFX_tbuffer 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
++#endif
++
++#ifndef GL_EXT_multisample
++#define GL_EXT_multisample 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
++GLAPI void APIENTRY glSamplePatternEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
++typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
++#endif
++
++#ifndef GL_SGIX_vertex_preclip
++#define GL_SGIX_vertex_preclip 1
++#endif
++
++#ifndef GL_SGIX_convolution_accuracy
++#define GL_SGIX_convolution_accuracy 1
++#endif
++
++#ifndef GL_SGIX_resample
++#define GL_SGIX_resample 1
++#endif
++
++#ifndef GL_SGIS_point_line_texgen
++#define GL_SGIS_point_line_texgen 1
++#endif
++
++#ifndef GL_SGIS_texture_color_mask
++#define GL_SGIS_texture_color_mask 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
++#endif
++
++#ifndef GL_SGIX_igloo_interface
++#define GL_SGIX_igloo_interface 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
++#endif
++
++#ifndef GL_EXT_texture_env_dot3
++#define GL_EXT_texture_env_dot3 1
++#endif
++
++#ifndef GL_ATI_texture_mirror_once
++#define GL_ATI_texture_mirror_once 1
++#endif
++
++#ifndef GL_NV_fence
++#define GL_NV_fence 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
++GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
++GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glFinishFenceNV (GLuint);
++GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
++typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
++typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
++typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
++typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
++typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
++#endif
++
++#ifndef GL_NV_evaluators
++#define GL_NV_evaluators 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
++GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
++GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
++typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
++typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
++#endif
++
++#ifndef GL_NV_packed_depth_stencil
++#define GL_NV_packed_depth_stencil 1
++#endif
++
++#ifndef GL_NV_register_combiners2
++#define GL_NV_register_combiners2 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_NV_texture_compression_vtc
++#define GL_NV_texture_compression_vtc 1
++#endif
++
++#ifndef GL_NV_texture_rectangle
++#define GL_NV_texture_rectangle 1
++#endif
++
++#ifndef GL_NV_texture_shader
++#define GL_NV_texture_shader 1
++#endif
++
++#ifndef GL_NV_texture_shader2
++#define GL_NV_texture_shader2 1
++#endif
++
++#ifndef GL_NV_vertex_array_range2
++#define GL_NV_vertex_array_range2 1
++#endif
++
++#ifndef GL_NV_vertex_program
++#define GL_NV_vertex_program 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
++GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
++GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
++GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
++GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
++GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
++GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
++GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
++GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
++GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
++GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
++GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
++GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
++GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
++GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
++GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
++GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
++GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
++GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
++GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
++GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
++GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
++GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
++GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
++GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
++GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
++GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
++GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
++typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
++typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
++typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
++typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
++typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
++typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
++typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
++#endif
++
++#ifndef GL_SGIX_texture_coordinate_clamp
++#define GL_SGIX_texture_coordinate_clamp 1
++#endif
++
++#ifndef GL_SGIX_scalebias_hint
++#define GL_SGIX_scalebias_hint 1
++#endif
++
++#ifndef GL_OML_interlace
++#define GL_OML_interlace 1
++#endif
++
++#ifndef GL_OML_subsample
++#define GL_OML_subsample 1
++#endif
++
++#ifndef GL_OML_resample
++#define GL_OML_resample 1
++#endif
++
++#ifndef GL_NV_copy_depth_to_color
++#define GL_NV_copy_depth_to_color 1
++#endif
++
++#ifndef GL_ATI_envmap_bumpmap
++#define GL_ATI_envmap_bumpmap 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
++GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
++typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
++typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
++typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
++#endif
++
++#ifndef GL_ATI_fragment_shader
++#define GL_ATI_fragment_shader 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
++GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
++GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
++GLAPI void APIENTRY glBeginFragmentShaderATI (void);
++GLAPI void APIENTRY glEndFragmentShaderATI (void);
++GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
++GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
++GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
++typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
++typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
++typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
++typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
++typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
++typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
++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);
++typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
++typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
++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);
++typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
++#endif
++
++#ifndef GL_ATI_pn_triangles
++#define GL_ATI_pn_triangles 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
++GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
++#endif
++
++#ifndef GL_ATI_vertex_array_object
++#define GL_ATI_vertex_array_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
++GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
++GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
++GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
++/* ERO Begin */
++GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
++/* ERO End */
++GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
++GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
++GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
++typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
++typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
++typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
++typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
++#endif
++
++#ifndef GL_EXT_vertex_shader
++#define GL_EXT_vertex_shader 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBeginVertexShaderEXT (void);
++GLAPI void APIENTRY glEndVertexShaderEXT (void);
++GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
++GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
++GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
++GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
++GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
++GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
++GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
++GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
++GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
++GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
++GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
++GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
++GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
++GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
++GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
++GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
++GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
++GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
++GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
++GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
++GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
++GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
++GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
++GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
++typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
++typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
++typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
++typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
++typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
++typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
++typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
++typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
++typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
++typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
++typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
++typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
++typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
++typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
++typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
++typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
++typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
++typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
++typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
++typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
++typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
++typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
++typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
++typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
++typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
++typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
++typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
++typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
++typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
++typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
++typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
++typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
++typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
++typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
++typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
++typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
++typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
++typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
++typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
++#endif
++
++#ifndef GL_ATI_vertex_streams
++#define GL_ATI_vertex_streams 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
++GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
++GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
++GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
++GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
++GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
++GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
++GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
++GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
++GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
++GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
++GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
++typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
++#endif
++
++#ifndef GL_ATI_element_array
++#define GL_ATI_element_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
++GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
++GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
++#endif
++
++#ifndef GL_SUN_mesh_array
++#define GL_SUN_mesh_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
++#endif
++
++#ifndef GL_SUN_slice_accum
++#define GL_SUN_slice_accum 1
++#endif
++
++#ifndef GL_NV_multisample_filter_hint
++#define GL_NV_multisample_filter_hint 1
++#endif
++
++#ifndef GL_NV_depth_clamp
++#define GL_NV_depth_clamp 1
++#endif
++
++#ifndef GL_NV_occlusion_query
++#define GL_NV_occlusion_query 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
++GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
++GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
++GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
++GLAPI void APIENTRY glEndOcclusionQueryNV (void);
++GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
++typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
++typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
++typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
++#endif
++
++#ifndef GL_NV_point_sprite
++#define GL_NV_point_sprite 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
++GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
++#endif
++
++#ifndef GL_NV_texture_shader3
++#define GL_NV_texture_shader3 1
++#endif
++
++#ifndef GL_NV_vertex_program1_1
++#define GL_NV_vertex_program1_1 1
++#endif
++
++#ifndef GL_EXT_shadow_funcs
++#define GL_EXT_shadow_funcs 1
++#endif
++
++#ifndef GL_EXT_stencil_two_side
++#define GL_EXT_stencil_two_side 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
++#endif
++
++#ifndef GL_ATI_text_fragment_shader
++#define GL_ATI_text_fragment_shader 1
++#endif
++
++#ifndef GL_APPLE_client_storage
++#define GL_APPLE_client_storage 1
++#endif
++
++#ifndef GL_APPLE_element_array
++#define GL_APPLE_element_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
++GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
++GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
++GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
++GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
++typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
++typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
++#endif
++
++#ifndef GL_APPLE_fence
++#define GL_APPLE_fence 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
++GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
++GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
++GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
++GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
++GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
++GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
++GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
++typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
++typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
++typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
++typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
++typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
++typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
++typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
++#endif
++
++#ifndef GL_APPLE_vertex_array_object
++#define GL_APPLE_vertex_array_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
++GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
++typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
++typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
++typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
++#endif
++
++#ifndef GL_APPLE_vertex_array_range
++#define GL_APPLE_vertex_array_range 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
++GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
++GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
++typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
++typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
++#endif
++
++#ifndef GL_APPLE_ycbcr_422
++#define GL_APPLE_ycbcr_422 1
++#endif
++
++#ifndef GL_S3_s3tc
++#define GL_S3_s3tc 1
++#endif
++
++#ifndef GL_ATI_draw_buffers
++#define GL_ATI_draw_buffers 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
++#endif
++
++#ifndef GL_ATI_pixel_format_float
++#define GL_ATI_pixel_format_float 1
++/* This is really a WGL extension, but defines some associated GL enums.
++ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
++ */
++#endif
++
++#ifndef GL_ATI_texture_env_combine3
++#define GL_ATI_texture_env_combine3 1
++#endif
++
++#ifndef GL_ATI_texture_float
++#define GL_ATI_texture_float 1
++#endif
++
++#ifndef GL_NV_float_buffer
++#define GL_NV_float_buffer 1
++#endif
++
++#ifndef GL_NV_fragment_program
++#define GL_NV_fragment_program 1
++/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
++GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
++GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
++typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
++typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
++#endif
++
++#ifndef GL_NV_half_float
++#define GL_NV_half_float 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
++GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
++GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
++GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
++GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
++GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
++GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
++GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
++GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
++GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
++GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
++typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
++typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
++typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
++typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
++typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
++typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
++typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
++typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
++typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
++typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
++typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
++#endif
++
++#ifndef GL_NV_pixel_data_range
++#define GL_NV_pixel_data_range 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
++GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
++typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
++#endif
++
++#ifndef GL_NV_primitive_restart
++#define GL_NV_primitive_restart 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPrimitiveRestartNV (void);
++GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
++typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
++#endif
++
++#ifndef GL_NV_texture_expand_normal
++#define GL_NV_texture_expand_normal 1
++#endif
++
++#ifndef GL_NV_vertex_program2
++#define GL_NV_vertex_program2 1
++#endif
++
++#ifndef GL_ATI_map_object_buffer
++#define GL_ATI_map_object_buffer 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
++GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
++#endif
++
++#ifndef GL_ATI_separate_stencil
++#define GL_ATI_separate_stencil 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
++typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
++#endif
++
++#ifndef GL_ATI_vertex_attrib_array_object
++#define GL_ATI_vertex_attrib_array_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
++GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
++#endif
++
++#ifndef GL_OES_read_format
++#define GL_OES_read_format 1
++#endif
++
++#ifndef GL_EXT_depth_bounds_test
++#define GL_EXT_depth_bounds_test 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
++#endif
++
++#ifndef GL_EXT_texture_mirror_clamp
++#define GL_EXT_texture_mirror_clamp 1
++#endif
++
++#ifndef GL_EXT_blend_equation_separate
++#define GL_EXT_blend_equation_separate 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
++#endif
++
++#ifndef GL_MESA_pack_invert
++#define GL_MESA_pack_invert 1
++#endif
++
++#ifndef GL_MESA_ycbcr_texture
++#define GL_MESA_ycbcr_texture 1
++#endif
++
++#ifndef GL_EXT_pixel_buffer_object
++#define GL_EXT_pixel_buffer_object 1
++#endif
++
++#ifndef GL_NV_fragment_program_option
++#define GL_NV_fragment_program_option 1
++#endif
++
++#ifndef GL_NV_fragment_program2
++#define GL_NV_fragment_program2 1
++#endif
++
++#ifndef GL_NV_vertex_program2_option
++#define GL_NV_vertex_program2_option 1
++#endif
++
++#ifndef GL_NV_vertex_program3
++#define GL_NV_vertex_program3 1
++#endif
++
++#ifndef GL_EXT_framebuffer_object
++#define GL_EXT_framebuffer_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
++GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
++GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
++GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
++GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
++GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
++GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
++GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
++GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
++GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
++GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
++typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
++typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
++typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
++typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
++typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
++typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
++typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
++typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
++typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
++#endif
++
++#ifndef GL_GREMEDY_string_marker
++#define GL_GREMEDY_string_marker 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
++#endif
++
++#ifndef GL_EXT_packed_depth_stencil
++#define GL_EXT_packed_depth_stencil 1
++#endif
++
++#ifndef GL_EXT_stencil_clear_tag
++#define GL_EXT_stencil_clear_tag 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
++#endif
++
++#ifndef GL_EXT_texture_sRGB
++#define GL_EXT_texture_sRGB 1
++#endif
++
++#ifndef GL_EXT_framebuffer_blit
++#define GL_EXT_framebuffer_blit 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
++#endif
++
++#ifndef GL_EXT_framebuffer_multisample
++#define GL_EXT_framebuffer_multisample 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
++#endif
++
++#ifndef GL_MESAX_texture_stack
++#define GL_MESAX_texture_stack 1
++#endif
++
++#ifndef GL_EXT_timer_query
++#define GL_EXT_timer_query 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
++GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
++#endif
++
++#ifndef GL_EXT_gpu_program_parameters
++#define GL_EXT_gpu_program_parameters 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
++#endif
++
++#ifndef GL_APPLE_flush_buffer_range
++#define GL_APPLE_flush_buffer_range 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
++#endif
++
++#ifndef GL_NV_gpu_program4
++#define GL_NV_gpu_program4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
++GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
++GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
++GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
++GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
++GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
++GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
++GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
++GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
++GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
++#endif
++
++#ifndef GL_NV_geometry_program4
++#define GL_NV_geometry_program4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
++GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
++GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
++GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
++#endif
++
++#ifndef GL_EXT_geometry_shader4
++#define GL_EXT_geometry_shader4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
++#endif
++
++#ifndef GL_NV_vertex_program4
++#define GL_NV_vertex_program4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
++GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
++GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
++GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
++GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
++#endif
++
++#ifndef GL_EXT_gpu_shader4
++#define GL_EXT_gpu_shader4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
++GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
++GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
++GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
++GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
++GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
++typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
++typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
++typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
++typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
++typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
++typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
++typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
++typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
++typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
++typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
++#endif
++
++#ifndef GL_EXT_draw_instanced
++#define GL_EXT_draw_instanced 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
++GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
++typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
++#endif
++
++#ifndef GL_EXT_packed_float
++#define GL_EXT_packed_float 1
++#endif
++
++#ifndef GL_EXT_texture_array
++#define GL_EXT_texture_array 1
++#endif
++
++#ifndef GL_EXT_texture_buffer_object
++#define GL_EXT_texture_buffer_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
++#endif
++
++#ifndef GL_EXT_texture_compression_latc
++#define GL_EXT_texture_compression_latc 1
++#endif
++
++#ifndef GL_EXT_texture_compression_rgtc
++#define GL_EXT_texture_compression_rgtc 1
++#endif
++
++#ifndef GL_EXT_texture_shared_exponent
++#define GL_EXT_texture_shared_exponent 1
++#endif
++
++#ifndef GL_NV_depth_buffer_float
++#define GL_NV_depth_buffer_float 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
++GLAPI void APIENTRY glClearDepthdNV (GLdouble);
++GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
++typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
++typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
++#endif
++
++#ifndef GL_NV_fragment_program4
++#define GL_NV_fragment_program4 1
++#endif
++
++#ifndef GL_NV_framebuffer_multisample_coverage
++#define GL_NV_framebuffer_multisample_coverage 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
++#endif
++
++#ifndef GL_EXT_framebuffer_sRGB
++#define GL_EXT_framebuffer_sRGB 1
++#endif
++
++#ifndef GL_NV_geometry_shader4
++#define GL_NV_geometry_shader4 1
++#endif
++
++#ifndef GL_NV_parameter_buffer_object
++#define GL_NV_parameter_buffer_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
++GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
++typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
++#endif
++
++#ifndef GL_EXT_draw_buffers2
++#define GL_EXT_draw_buffers2 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
++GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
++GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
++GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
++GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
++GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
++typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
++typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
++typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
++typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
++typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
++#endif
++
++#ifndef GL_NV_transform_feedback
++#define GL_NV_transform_feedback 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
++GLAPI void APIENTRY glEndTransformFeedbackNV (void);
++GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
++GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
++GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
++GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
++GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
++GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
++GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
++GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
++GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
++typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
++typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
++typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
++typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
++typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
++typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
++typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
++typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
++typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
++typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
++#endif
++
++#ifndef GL_EXT_bindable_uniform
++#define GL_EXT_bindable_uniform 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
++GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
++GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
++typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
++typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
++#endif
++
++#ifndef GL_EXT_texture_integer
++#define GL_EXT_texture_integer 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
++GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
++GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
++typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
++typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
++typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
++#endif
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
++
++
++/* ERO */
++GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
+Index: trunk/target-i386/mesa_glu.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/mesa_glu.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,354 @@
++/*
++** License Applicability. Except to the extent portions of this file are
++** made subject to an alternative license as permitted in the SGI Free
++** Software License B, Version 1.1 (the "License"), the contents of this
++** file are subject only to the provisions of the License. You may not use
++** this file except in compliance with the License. You may obtain a copy
++** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
++** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
++**
++** http://oss.sgi.com/projects/FreeB
++**
++** Note that, as provided in the License, the Software is distributed on an
++** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
++** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
++** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
++** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
++**
++** Original Code. The Original Code is: OpenGL Sample Implementation,
++** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
++** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
++** Copyright in any portions created by third parties is as indicated
++** elsewhere herein. All Rights Reserved.
++**
++** Additional Notice Provisions: This software was created using the
++** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
++** not been independently verified as being compliant with the OpenGL(R)
++** version 1.2.1 Specification.
++*/
++
++#ifndef __glu_h__
++#define __glu_h__
++
++#if defined(USE_MGL_NAMESPACE)
++#include "glu_mangle.h"
++#endif
++
++//#include <GL/gl.h>
++#include "mesa_gl.h"
++
++#ifndef GLAPIENTRY
++#define GLAPIENTRY
++#endif
++
++#ifndef GLAPIENTRYP
++#define GLAPIENTRYP GLAPIENTRY *
++#endif
++
++#ifdef GLAPI
++#undef GLAPI
++#endif
++
++# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
++# define GLAPI __declspec(dllexport)
++# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
++# define GLAPI __declspec(dllimport)
++# else /* for use with static link lib build of Win32 edition only */
++# define GLAPI extern
++# endif /* _STATIC_MESA support */
++
++
++#ifndef GLAPI
++#define GLAPI
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*************************************************************/
++
++/* Extensions */
++#define GLU_EXT_object_space_tess 1
++#define GLU_EXT_nurbs_tessellator 1
++
++/* Boolean */
++#define GLU_FALSE 0
++#define GLU_TRUE 1
++
++/* Version */
++#define GLU_VERSION_1_1 1
++#define GLU_VERSION_1_2 1
++#define GLU_VERSION_1_3 1
++
++/* StringName */
++#define GLU_VERSION 100800
++#define GLU_EXTENSIONS 100801
++
++/* ErrorCode */
++#define GLU_INVALID_ENUM 100900
++#define GLU_INVALID_VALUE 100901
++#define GLU_OUT_OF_MEMORY 100902
++#define GLU_INCOMPATIBLE_GL_VERSION 100903
++#define GLU_INVALID_OPERATION 100904
++
++/* NurbsDisplay */
++/* GLU_FILL */
++#define GLU_OUTLINE_POLYGON 100240
++#define GLU_OUTLINE_PATCH 100241
++
++/* NurbsCallback */
++#define GLU_NURBS_ERROR 100103
++#define GLU_ERROR 100103
++#define GLU_NURBS_BEGIN 100164
++#define GLU_NURBS_BEGIN_EXT 100164
++#define GLU_NURBS_VERTEX 100165
++#define GLU_NURBS_VERTEX_EXT 100165
++#define GLU_NURBS_NORMAL 100166
++#define GLU_NURBS_NORMAL_EXT 100166
++#define GLU_NURBS_COLOR 100167
++#define GLU_NURBS_COLOR_EXT 100167
++#define GLU_NURBS_TEXTURE_COORD 100168
++#define GLU_NURBS_TEX_COORD_EXT 100168
++#define GLU_NURBS_END 100169
++#define GLU_NURBS_END_EXT 100169
++#define GLU_NURBS_BEGIN_DATA 100170
++#define GLU_NURBS_BEGIN_DATA_EXT 100170
++#define GLU_NURBS_VERTEX_DATA 100171
++#define GLU_NURBS_VERTEX_DATA_EXT 100171
++#define GLU_NURBS_NORMAL_DATA 100172
++#define GLU_NURBS_NORMAL_DATA_EXT 100172
++#define GLU_NURBS_COLOR_DATA 100173
++#define GLU_NURBS_COLOR_DATA_EXT 100173
++#define GLU_NURBS_TEXTURE_COORD_DATA 100174
++#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
++#define GLU_NURBS_END_DATA 100175
++#define GLU_NURBS_END_DATA_EXT 100175
++
++/* NurbsError */
++#define GLU_NURBS_ERROR1 100251
++#define GLU_NURBS_ERROR2 100252
++#define GLU_NURBS_ERROR3 100253
++#define GLU_NURBS_ERROR4 100254
++#define GLU_NURBS_ERROR5 100255
++#define GLU_NURBS_ERROR6 100256
++#define GLU_NURBS_ERROR7 100257
++#define GLU_NURBS_ERROR8 100258
++#define GLU_NURBS_ERROR9 100259
++#define GLU_NURBS_ERROR10 100260
++#define GLU_NURBS_ERROR11 100261
++#define GLU_NURBS_ERROR12 100262
++#define GLU_NURBS_ERROR13 100263
++#define GLU_NURBS_ERROR14 100264
++#define GLU_NURBS_ERROR15 100265
++#define GLU_NURBS_ERROR16 100266
++#define GLU_NURBS_ERROR17 100267
++#define GLU_NURBS_ERROR18 100268
++#define GLU_NURBS_ERROR19 100269
++#define GLU_NURBS_ERROR20 100270
++#define GLU_NURBS_ERROR21 100271
++#define GLU_NURBS_ERROR22 100272
++#define GLU_NURBS_ERROR23 100273
++#define GLU_NURBS_ERROR24 100274
++#define GLU_NURBS_ERROR25 100275
++#define GLU_NURBS_ERROR26 100276
++#define GLU_NURBS_ERROR27 100277
++#define GLU_NURBS_ERROR28 100278
++#define GLU_NURBS_ERROR29 100279
++#define GLU_NURBS_ERROR30 100280
++#define GLU_NURBS_ERROR31 100281
++#define GLU_NURBS_ERROR32 100282
++#define GLU_NURBS_ERROR33 100283
++#define GLU_NURBS_ERROR34 100284
++#define GLU_NURBS_ERROR35 100285
++#define GLU_NURBS_ERROR36 100286
++#define GLU_NURBS_ERROR37 100287
++
++/* NurbsProperty */
++#define GLU_AUTO_LOAD_MATRIX 100200
++#define GLU_CULLING 100201
++#define GLU_SAMPLING_TOLERANCE 100203
++#define GLU_DISPLAY_MODE 100204
++#define GLU_PARAMETRIC_TOLERANCE 100202
++#define GLU_SAMPLING_METHOD 100205
++#define GLU_U_STEP 100206
++#define GLU_V_STEP 100207
++#define GLU_NURBS_MODE 100160
++#define GLU_NURBS_MODE_EXT 100160
++#define GLU_NURBS_TESSELLATOR 100161
++#define GLU_NURBS_TESSELLATOR_EXT 100161
++#define GLU_NURBS_RENDERER 100162
++#define GLU_NURBS_RENDERER_EXT 100162
++
++/* NurbsSampling */
++#define GLU_OBJECT_PARAMETRIC_ERROR 100208
++#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
++#define GLU_OBJECT_PATH_LENGTH 100209
++#define GLU_OBJECT_PATH_LENGTH_EXT 100209
++#define GLU_PATH_LENGTH 100215
++#define GLU_PARAMETRIC_ERROR 100216
++#define GLU_DOMAIN_DISTANCE 100217
++
++/* NurbsTrim */
++#define GLU_MAP1_TRIM_2 100210
++#define GLU_MAP1_TRIM_3 100211
++
++/* QuadricDrawStyle */
++#define GLU_POINT 100010
++#define GLU_LINE 100011
++#define GLU_FILL 100012
++#define GLU_SILHOUETTE 100013
++
++/* QuadricCallback */
++/* GLU_ERROR */
++
++/* QuadricNormal */
++#define GLU_SMOOTH 100000
++#define GLU_FLAT 100001
++#define GLU_NONE 100002
++
++/* QuadricOrientation */
++#define GLU_OUTSIDE 100020
++#define GLU_INSIDE 100021
++
++/* TessCallback */
++#define GLU_TESS_BEGIN 100100
++#define GLU_BEGIN 100100
++#define GLU_TESS_VERTEX 100101
++#define GLU_VERTEX 100101
++#define GLU_TESS_END 100102
++#define GLU_END 100102
++#define GLU_TESS_ERROR 100103
++#define GLU_TESS_EDGE_FLAG 100104
++#define GLU_EDGE_FLAG 100104
++#define GLU_TESS_COMBINE 100105
++#define GLU_TESS_BEGIN_DATA 100106
++#define GLU_TESS_VERTEX_DATA 100107
++#define GLU_TESS_END_DATA 100108
++#define GLU_TESS_ERROR_DATA 100109
++#define GLU_TESS_EDGE_FLAG_DATA 100110
++#define GLU_TESS_COMBINE_DATA 100111
++
++/* TessContour */
++#define GLU_CW 100120
++#define GLU_CCW 100121
++#define GLU_INTERIOR 100122
++#define GLU_EXTERIOR 100123
++#define GLU_UNKNOWN 100124
++
++/* TessProperty */
++#define GLU_TESS_WINDING_RULE 100140
++#define GLU_TESS_BOUNDARY_ONLY 100141
++#define GLU_TESS_TOLERANCE 100142
++
++/* TessError */
++#define GLU_TESS_ERROR1 100151
++#define GLU_TESS_ERROR2 100152
++#define GLU_TESS_ERROR3 100153
++#define GLU_TESS_ERROR4 100154
++#define GLU_TESS_ERROR5 100155
++#define GLU_TESS_ERROR6 100156
++#define GLU_TESS_ERROR7 100157
++#define GLU_TESS_ERROR8 100158
++#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
++#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
++#define GLU_TESS_MISSING_END_POLYGON 100153
++#define GLU_TESS_MISSING_END_CONTOUR 100154
++#define GLU_TESS_COORD_TOO_LARGE 100155
++#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
++
++/* TessWinding */
++#define GLU_TESS_WINDING_ODD 100130
++#define GLU_TESS_WINDING_NONZERO 100131
++#define GLU_TESS_WINDING_POSITIVE 100132
++#define GLU_TESS_WINDING_NEGATIVE 100133
++#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
++
++/*************************************************************/
++
++
++#ifdef __cplusplus
++class GLUnurbs;
++class GLUquadric;
++class GLUtesselator;
++#else
++typedef struct GLUnurbs GLUnurbs;
++typedef struct GLUquadric GLUquadric;
++typedef struct GLUtesselator GLUtesselator;
++#endif
++
++typedef GLUnurbs GLUnurbsObj;
++typedef GLUquadric GLUquadricObj;
++typedef GLUtesselator GLUtesselatorObj;
++typedef GLUtesselator GLUtriangulatorObj;
++
++#define GLU_TESS_MAX_COORD 1.0e150
++
++/* Internal convenience typedefs */
++typedef void (GLAPIENTRYP _GLUfuncptr)();
++
++GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
++GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
++GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
++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);
++GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
++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);
++GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
++GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
++GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
++GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
++GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
++GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
++GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
++GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
++GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
++GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
++GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
++GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
++GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
++GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
++GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
++GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
++GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
++GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
++GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
++GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
++GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
++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);
++GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
++GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
++GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
++GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
++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);
++GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
++GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
++GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
++GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
++GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
++GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
++GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
++GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
++GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
++GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
++GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
++GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
++GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
++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);
++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);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* __glu_h__ */
+Index: trunk/target-i386/mesa_glx.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/mesa_glx.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,510 @@
++/*
++ * Mesa 3-D graphics library
++ * Version: 6.5
++ *
++ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included
++ * in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++
++#ifndef GLX_H
++#define GLX_H
++
++
++#ifdef __VMS
++#include <GL/vms_x_fix.h>
++# ifdef __cplusplus
++/* VMS Xlib.h gives problems with C++.
++ * this avoids a bunch of trivial warnings */
++#pragma message disable nosimpint
++#endif
++#endif
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++#ifdef __VMS
++# ifdef __cplusplus
++#pragma message enable nosimpint
++#endif
++#endif
++#include <mesa_gl.h>
++
++
++#if defined(USE_MGL_NAMESPACE)
++#include "glx_mangle.h"
++#endif
++
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++
++#define GLX_VERSION_1_1 1
++#define GLX_VERSION_1_2 1
++#define GLX_VERSION_1_3 1
++#define GLX_VERSION_1_4 1
++
++#define GLX_EXTENSION_NAME "GLX"
++
++
++
++/*
++ * Tokens for glXChooseVisual and glXGetConfig:
++ */
++#define GLX_USE_GL 1
++#define GLX_BUFFER_SIZE 2
++#define GLX_LEVEL 3
++#define GLX_RGBA 4
++#define GLX_DOUBLEBUFFER 5
++#define GLX_STEREO 6
++#define GLX_AUX_BUFFERS 7
++#define GLX_RED_SIZE 8
++#define GLX_GREEN_SIZE 9
++#define GLX_BLUE_SIZE 10
++#define GLX_ALPHA_SIZE 11
++#define GLX_DEPTH_SIZE 12
++#define GLX_STENCIL_SIZE 13
++#define GLX_ACCUM_RED_SIZE 14
++#define GLX_ACCUM_GREEN_SIZE 15
++#define GLX_ACCUM_BLUE_SIZE 16
++#define GLX_ACCUM_ALPHA_SIZE 17
++
++
++/*
++ * Error codes returned by glXGetConfig:
++ */
++#define GLX_BAD_SCREEN 1
++#define GLX_BAD_ATTRIBUTE 2
++#define GLX_NO_EXTENSION 3
++#define GLX_BAD_VISUAL 4
++#define GLX_BAD_CONTEXT 5
++#define GLX_BAD_VALUE 6
++#define GLX_BAD_ENUM 7
++
++
++/*
++ * GLX 1.1 and later:
++ */
++#define GLX_VENDOR 1
++#define GLX_VERSION 2
++#define GLX_EXTENSIONS 3
++
++
++/*
++ * GLX 1.3 and later:
++ */
++#define GLX_CONFIG_CAVEAT 0x20
++#define GLX_DONT_CARE 0xFFFFFFFF
++#define GLX_X_VISUAL_TYPE 0x22
++#define GLX_TRANSPARENT_TYPE 0x23
++#define GLX_TRANSPARENT_INDEX_VALUE 0x24
++#define GLX_TRANSPARENT_RED_VALUE 0x25
++#define GLX_TRANSPARENT_GREEN_VALUE 0x26
++#define GLX_TRANSPARENT_BLUE_VALUE 0x27
++#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
++#define GLX_WINDOW_BIT 0x00000001
++#define GLX_PIXMAP_BIT 0x00000002
++#define GLX_PBUFFER_BIT 0x00000004
++#define GLX_AUX_BUFFERS_BIT 0x00000010
++#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
++#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
++#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
++#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
++#define GLX_DEPTH_BUFFER_BIT 0x00000020
++#define GLX_STENCIL_BUFFER_BIT 0x00000040
++#define GLX_ACCUM_BUFFER_BIT 0x00000080
++#define GLX_NONE 0x8000
++#define GLX_SLOW_CONFIG 0x8001
++#define GLX_TRUE_COLOR 0x8002
++#define GLX_DIRECT_COLOR 0x8003
++#define GLX_PSEUDO_COLOR 0x8004
++#define GLX_STATIC_COLOR 0x8005
++#define GLX_GRAY_SCALE 0x8006
++#define GLX_STATIC_GRAY 0x8007
++#define GLX_TRANSPARENT_RGB 0x8008
++#define GLX_TRANSPARENT_INDEX 0x8009
++#define GLX_VISUAL_ID 0x800B
++#define GLX_SCREEN 0x800C
++#define GLX_NON_CONFORMANT_CONFIG 0x800D
++#define GLX_DRAWABLE_TYPE 0x8010
++#define GLX_RENDER_TYPE 0x8011
++#define GLX_X_RENDERABLE 0x8012
++#define GLX_FBCONFIG_ID 0x8013
++#define GLX_RGBA_TYPE 0x8014
++#define GLX_COLOR_INDEX_TYPE 0x8015
++#define GLX_MAX_PBUFFER_WIDTH 0x8016
++#define GLX_MAX_PBUFFER_HEIGHT 0x8017
++#define GLX_MAX_PBUFFER_PIXELS 0x8018
++#define GLX_PRESERVED_CONTENTS 0x801B
++#define GLX_LARGEST_PBUFFER 0x801C
++#define GLX_WIDTH 0x801D
++#define GLX_HEIGHT 0x801E
++#define GLX_EVENT_MASK 0x801F
++#define GLX_DAMAGED 0x8020
++#define GLX_SAVED 0x8021
++#define GLX_WINDOW 0x8022
++#define GLX_PBUFFER 0x8023
++#define GLX_PBUFFER_HEIGHT 0x8040
++#define GLX_PBUFFER_WIDTH 0x8041
++#define GLX_RGBA_BIT 0x00000001
++#define GLX_COLOR_INDEX_BIT 0x00000002
++#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
++
++
++/*
++ * GLX 1.4 and later:
++ */
++#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
++#define GLX_SAMPLES 0x186a1 /*100001*/
++
++
++
++typedef struct __GLXcontextRec *GLXContext;
++typedef XID GLXPixmap;
++typedef XID GLXDrawable;
++/* GLX 1.3 and later */
++typedef struct __GLXFBConfigRec *GLXFBConfig;
++typedef XID GLXFBConfigID;
++typedef XID GLXContextID;
++typedef XID GLXWindow;
++typedef XID GLXPbuffer;
++
++
++
++extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
++ int *attribList );
++
++extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
++ GLXContext shareList, Bool direct );
++
++extern void glXDestroyContext( Display *dpy, GLXContext ctx );
++
++extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
++ GLXContext ctx);
++
++extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
++ unsigned long mask );
++
++extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
++
++extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
++ Pixmap pixmap );
++
++extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
++
++extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
++
++extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
++
++extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
++
++extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
++ int attrib, int *value );
++
++extern GLXContext glXGetCurrentContext( void );
++
++extern GLXDrawable glXGetCurrentDrawable( void );
++
++extern void glXWaitGL( void );
++
++extern void glXWaitX( void );
++
++extern void glXUseXFont( Font font, int first, int count, int list );
++
++
++
++/* GLX 1.1 and later */
++extern const char *glXQueryExtensionsString( Display *dpy, int screen );
++
++extern const char *glXQueryServerString( Display *dpy, int screen, int name );
++
++extern const char *glXGetClientString( Display *dpy, int name );
++
++
++/* GLX 1.2 and later */
++extern Display *glXGetCurrentDisplay( void );
++
++
++/* GLX 1.3 and later */
++extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
++ const int *attribList, int *nitems );
++
++extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
++ int attribute, int *value );
++
++extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
++ int *nelements );
++
++extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
++ GLXFBConfig config );
++
++extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
++ Window win, const int *attribList );
++
++extern void glXDestroyWindow( Display *dpy, GLXWindow window );
++
++extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
++ Pixmap pixmap, const int *attribList );
++
++extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
++
++extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
++ const int *attribList );
++
++extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
++
++extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
++ unsigned int *value );
++
++extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
++ int renderType, GLXContext shareList,
++ Bool direct );
++
++extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
++ GLXDrawable read, GLXContext ctx );
++
++extern GLXDrawable glXGetCurrentReadDrawable( void );
++
++extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
++ int *value );
++
++extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
++ unsigned long mask );
++
++extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
++ unsigned long *mask );
++
++
++/* GLX 1.4 and later */
++extern void (*glXGetProcAddress(const GLubyte *procname))( void );
++
++
++#ifndef GLX_GLXEXT_LEGACY
++
++#include <mesa_glxext.h>
++
++#else
++
++
++
++/*
++ * ARB 2. GLX_ARB_get_proc_address
++ */
++#ifndef GLX_ARB_get_proc_address
++#define GLX_ARB_get_proc_address 1
++
++typedef void (*__GLXextFuncPtr)(void);
++extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
++
++#endif /* GLX_ARB_get_proc_address */
++
++
++
++#endif /* GLX_GLXEXT_LEGACY */
++
++
++/**
++ ** The following aren't in glxext.h yet.
++ **/
++
++
++/*
++ * ???. GLX_NV_vertex_array_range
++ */
++#ifndef GLX_NV_vertex_array_range
++#define GLX_NV_vertex_array_range
++
++extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
++extern void glXFreeMemoryNV(GLvoid *pointer);
++typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
++typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
++
++#endif /* GLX_NV_vertex_array_range */
++
++
++/*
++ * ???. GLX_MESA_allocate_memory
++ */
++#ifndef GLX_MESA_allocate_memory
++#define GLX_MESA_allocate_memory 1
++
++extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
++extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
++extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
++typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
++typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
++typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
++
++#endif /* GLX_MESA_allocate_memory */
++
++
++/*
++ * ARB ?. GLX_ARB_render_texture
++ * XXX This was never finalized!
++ */
++#ifndef GLX_ARB_render_texture
++#define GLX_ARB_render_texture 1
++
++extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
++extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
++extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
++
++#endif /* GLX_ARB_render_texture */
++
++
++#ifndef GLX_ATI_render_texture
++#define GLX_ATI_render_texture 1
++
++extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
++extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
++extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
++
++#endif /* GLX_ATI_render_texture */
++
++
++/*
++ * Remove this when glxext.h is updated.
++ */
++#ifndef GLX_NV_float_buffer
++#define GLX_NV_float_buffer 1
++
++#define GLX_FLOAT_COMPONENTS_NV 0x20B0
++
++#endif /* GLX_NV_float_buffer */
++
++
++
++/*
++ * #?. GLX_MESA_swap_frame_usage
++ */
++#ifndef GLX_MESA_swap_frame_usage
++#define GLX_MESA_swap_frame_usage 1
++
++extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
++extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
++extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
++extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
++
++typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
++typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
++typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
++typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
++
++#endif /* GLX_MESA_swap_frame_usage */
++
++
++
++/*
++ * #?. GLX_MESA_swap_control
++ */
++#ifndef GLX_MESA_swap_control
++#define GLX_MESA_swap_control 1
++
++extern int glXSwapIntervalMESA(unsigned int interval);
++extern int glXGetSwapIntervalMESA(void);
++
++typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
++typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
++
++#endif /* GLX_MESA_swap_control */
++
++
++
++/*
++ * #?. GLX_EXT_texture_from_pixmap
++ * XXX not finished?
++ */
++#ifndef GLX_EXT_texture_from_pixmap
++#define GLX_EXT_texture_from_pixmap 1
++
++#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
++#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
++#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
++#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
++#define GLX_Y_INVERTED_EXT 0x20D4
++
++#define GLX_TEXTURE_FORMAT_EXT 0x20D5
++#define GLX_TEXTURE_TARGET_EXT 0x20D6
++#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
++
++#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
++#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
++#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
++
++#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
++#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
++#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
++
++#define GLX_TEXTURE_1D_EXT 0x20DB
++#define GLX_TEXTURE_2D_EXT 0x20DC
++#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
++
++#define GLX_FRONT_LEFT_EXT 0x20DE
++#define GLX_FRONT_RIGHT_EXT 0x20DF
++#define GLX_BACK_LEFT_EXT 0x20E0
++#define GLX_BACK_RIGHT_EXT 0x20E1
++#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
++#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
++#define GLX_AUX0_EXT 0x20E2
++#define GLX_AUX1_EXT 0x20E3
++#define GLX_AUX2_EXT 0x20E4
++#define GLX_AUX3_EXT 0x20E5
++#define GLX_AUX4_EXT 0x20E6
++#define GLX_AUX5_EXT 0x20E7
++#define GLX_AUX6_EXT 0x20E8
++#define GLX_AUX7_EXT 0x20E9
++#define GLX_AUX8_EXT 0x20EA
++#define GLX_AUX9_EXT 0x20EB
++
++extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
++extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
++
++#endif /* GLX_EXT_texture_from_pixmap */
++
++
++
++
++/*** Should these go here, or in another header? */
++/*
++** GLX Events
++*/
++typedef struct {
++ int event_type; /* GLX_DAMAGED or GLX_SAVED */
++ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
++ unsigned long serial; /* # of last request processed by server */
++ Bool send_event; /* true if this came for SendEvent request */
++ Display *display; /* display the event was read from */
++ GLXDrawable drawable; /* XID of Drawable */
++ unsigned int buffer_mask; /* mask indicating which buffers are affected */
++ unsigned int aux_buffer; /* which aux buffer was affected */
++ int x, y;
++ int width, height;
++ int count; /* if nonzero, at least this many more */
++} GLXPbufferClobberEvent;
++
++typedef union __GLXEvent {
++ GLXPbufferClobberEvent glxpbufferclobber;
++ long pad[24];
++} GLXEvent;
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+Index: trunk/target-i386/mesa_glxext.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/mesa_glxext.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,785 @@
++#ifndef __glxext_h_
++#define __glxext_h_
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++** Copyright (c) 2007 The Khronos Group Inc.
++**
++** Permission is hereby granted, free of charge, to any person obtaining a
++** copy of this software and/or associated documentation files (the
++** "Materials"), to deal in the Materials without restriction, including
++** without limitation the rights to use, copy, modify, merge, publish,
++** distribute, sublicense, and/or sell copies of the Materials, and to
++** permit persons to whom the Materials are furnished to do so, subject to
++** the following conditions:
++**
++** The above copyright notice and this permission notice shall be included
++** in all copies or substantial portions of the Materials.
++**
++** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
++*/
++
++#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
++#define WIN32_LEAN_AND_MEAN 1
++#include <windows.h>
++#endif
++
++#ifndef APIENTRY
++#define APIENTRY
++#endif
++#ifndef APIENTRYP
++#define APIENTRYP APIENTRY *
++#endif
++#ifndef GLAPI
++#define GLAPI extern
++#endif
++
++/*************************************************************/
++
++/* Header file version number, required by OpenGL ABI for Linux */
++/* glxext.h last updated 2007/04/21 */
++/* Current version at http://www.opengl.org/registry/ */
++#define GLX_GLXEXT_VERSION 19
++
++#ifndef GLX_VERSION_1_3
++#define GLX_WINDOW_BIT 0x00000001
++#define GLX_PIXMAP_BIT 0x00000002
++#define GLX_PBUFFER_BIT 0x00000004
++#define GLX_RGBA_BIT 0x00000001
++#define GLX_COLOR_INDEX_BIT 0x00000002
++#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
++#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
++#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
++#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
++#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
++#define GLX_AUX_BUFFERS_BIT 0x00000010
++#define GLX_DEPTH_BUFFER_BIT 0x00000020
++#define GLX_STENCIL_BUFFER_BIT 0x00000040
++#define GLX_ACCUM_BUFFER_BIT 0x00000080
++#define GLX_CONFIG_CAVEAT 0x20
++#define GLX_X_VISUAL_TYPE 0x22
++#define GLX_TRANSPARENT_TYPE 0x23
++#define GLX_TRANSPARENT_INDEX_VALUE 0x24
++#define GLX_TRANSPARENT_RED_VALUE 0x25
++#define GLX_TRANSPARENT_GREEN_VALUE 0x26
++#define GLX_TRANSPARENT_BLUE_VALUE 0x27
++#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
++#define GLX_DONT_CARE 0xFFFFFFFF
++#define GLX_NONE 0x8000
++#define GLX_SLOW_CONFIG 0x8001
++#define GLX_TRUE_COLOR 0x8002
++#define GLX_DIRECT_COLOR 0x8003
++#define GLX_PSEUDO_COLOR 0x8004
++#define GLX_STATIC_COLOR 0x8005
++#define GLX_GRAY_SCALE 0x8006
++#define GLX_STATIC_GRAY 0x8007
++#define GLX_TRANSPARENT_RGB 0x8008
++#define GLX_TRANSPARENT_INDEX 0x8009
++#define GLX_VISUAL_ID 0x800B
++#define GLX_SCREEN 0x800C
++#define GLX_NON_CONFORMANT_CONFIG 0x800D
++#define GLX_DRAWABLE_TYPE 0x8010
++#define GLX_RENDER_TYPE 0x8011
++#define GLX_X_RENDERABLE 0x8012
++#define GLX_FBCONFIG_ID 0x8013
++#define GLX_RGBA_TYPE 0x8014
++#define GLX_COLOR_INDEX_TYPE 0x8015
++#define GLX_MAX_PBUFFER_WIDTH 0x8016
++#define GLX_MAX_PBUFFER_HEIGHT 0x8017
++#define GLX_MAX_PBUFFER_PIXELS 0x8018
++#define GLX_PRESERVED_CONTENTS 0x801B
++#define GLX_LARGEST_PBUFFER 0x801C
++#define GLX_WIDTH 0x801D
++#define GLX_HEIGHT 0x801E
++#define GLX_EVENT_MASK 0x801F
++#define GLX_DAMAGED 0x8020
++#define GLX_SAVED 0x8021
++#define GLX_WINDOW 0x8022
++#define GLX_PBUFFER 0x8023
++#define GLX_PBUFFER_HEIGHT 0x8040
++#define GLX_PBUFFER_WIDTH 0x8041
++#endif
++
++#ifndef GLX_VERSION_1_4
++#define GLX_SAMPLE_BUFFERS 100000
++#define GLX_SAMPLES 100001
++#endif
++
++#ifndef GLX_ARB_get_proc_address
++#endif
++
++#ifndef GLX_ARB_multisample
++#define GLX_SAMPLE_BUFFERS_ARB 100000
++#define GLX_SAMPLES_ARB 100001
++#endif
++
++#ifndef GLX_ARB_fbconfig_float
++#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
++#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
++#endif
++
++#ifndef GLX_SGIS_multisample
++#define GLX_SAMPLE_BUFFERS_SGIS 100000
++#define GLX_SAMPLES_SGIS 100001
++#endif
++
++#ifndef GLX_EXT_visual_info
++#define GLX_X_VISUAL_TYPE_EXT 0x22
++#define GLX_TRANSPARENT_TYPE_EXT 0x23
++#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
++#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
++#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
++#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
++#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
++#define GLX_NONE_EXT 0x8000
++#define GLX_TRUE_COLOR_EXT 0x8002
++#define GLX_DIRECT_COLOR_EXT 0x8003
++#define GLX_PSEUDO_COLOR_EXT 0x8004
++#define GLX_STATIC_COLOR_EXT 0x8005
++#define GLX_GRAY_SCALE_EXT 0x8006
++#define GLX_STATIC_GRAY_EXT 0x8007
++#define GLX_TRANSPARENT_RGB_EXT 0x8008
++#define GLX_TRANSPARENT_INDEX_EXT 0x8009
++#endif
++
++#ifndef GLX_SGI_swap_control
++#endif
++
++#ifndef GLX_SGI_video_sync
++#endif
++
++#ifndef GLX_SGI_make_current_read
++#endif
++
++#ifndef GLX_SGIX_video_source
++#endif
++
++#ifndef GLX_EXT_visual_rating
++#define GLX_VISUAL_CAVEAT_EXT 0x20
++#define GLX_SLOW_VISUAL_EXT 0x8001
++#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
++/* reuse GLX_NONE_EXT */
++#endif
++
++#ifndef GLX_EXT_import_context
++#define GLX_SHARE_CONTEXT_EXT 0x800A
++#define GLX_VISUAL_ID_EXT 0x800B
++#define GLX_SCREEN_EXT 0x800C
++#endif
++
++#ifndef GLX_SGIX_fbconfig
++#define GLX_WINDOW_BIT_SGIX 0x00000001
++#define GLX_PIXMAP_BIT_SGIX 0x00000002
++#define GLX_RGBA_BIT_SGIX 0x00000001
++#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
++#define GLX_DRAWABLE_TYPE_SGIX 0x8010
++#define GLX_RENDER_TYPE_SGIX 0x8011
++#define GLX_X_RENDERABLE_SGIX 0x8012
++#define GLX_FBCONFIG_ID_SGIX 0x8013
++#define GLX_RGBA_TYPE_SGIX 0x8014
++#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
++/* reuse GLX_SCREEN_EXT */
++#endif
++
++#ifndef GLX_SGIX_pbuffer
++#define GLX_PBUFFER_BIT_SGIX 0x00000004
++#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
++#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
++#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
++#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
++#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
++#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
++#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
++#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
++#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
++#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
++#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
++#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
++#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
++#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
++#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
++#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
++#define GLX_LARGEST_PBUFFER_SGIX 0x801C
++#define GLX_WIDTH_SGIX 0x801D
++#define GLX_HEIGHT_SGIX 0x801E
++#define GLX_EVENT_MASK_SGIX 0x801F
++#define GLX_DAMAGED_SGIX 0x8020
++#define GLX_SAVED_SGIX 0x8021
++#define GLX_WINDOW_SGIX 0x8022
++#define GLX_PBUFFER_SGIX 0x8023
++#endif
++
++#ifndef GLX_SGI_cushion
++#endif
++
++#ifndef GLX_SGIX_video_resize
++#define GLX_SYNC_FRAME_SGIX 0x00000000
++#define GLX_SYNC_SWAP_SGIX 0x00000001
++#endif
++
++#ifndef GLX_SGIX_dmbuffer
++#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
++#endif
++
++#ifndef GLX_SGIX_swap_group
++#endif
++
++#ifndef GLX_SGIX_swap_barrier
++#endif
++
++#ifndef GLX_SGIS_blended_overlay
++#define GLX_BLENDED_RGBA_SGIS 0x8025
++#endif
++
++#ifndef GLX_SGIS_shared_multisample
++#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
++#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
++#endif
++
++#ifndef GLX_SUN_get_transparent_index
++#endif
++
++#ifndef GLX_3DFX_multisample
++#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
++#define GLX_SAMPLES_3DFX 0x8051
++#endif
++
++#ifndef GLX_MESA_copy_sub_buffer
++#endif
++
++#ifndef GLX_MESA_pixmap_colormap
++#endif
++
++#ifndef GLX_MESA_release_buffers
++#endif
++
++#ifndef GLX_MESA_set_3dfx_mode
++#define GLX_3DFX_WINDOW_MODE_MESA 0x1
++#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
++#endif
++
++#ifndef GLX_SGIX_visual_select_group
++#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
++#endif
++
++#ifndef GLX_OML_swap_method
++#define GLX_SWAP_METHOD_OML 0x8060
++#define GLX_SWAP_EXCHANGE_OML 0x8061
++#define GLX_SWAP_COPY_OML 0x8062
++#define GLX_SWAP_UNDEFINED_OML 0x8063
++#endif
++
++#ifndef GLX_OML_sync_control
++#endif
++
++#ifndef GLX_NV_float_buffer
++#define GLX_FLOAT_COMPONENTS_NV 0x20B0
++#endif
++
++#ifndef GLX_SGIX_hyperpipe
++#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
++#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
++#define GLX_BAD_HYPERPIPE_SGIX 92
++#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
++#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
++#define GLX_PIPE_RECT_SGIX 0x00000001
++#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
++#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
++#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
++#define GLX_HYPERPIPE_ID_SGIX 0x8030
++#endif
++
++#ifndef GLX_MESA_agp_offset
++#endif
++
++#ifndef GLX_EXT_fbconfig_packed_float
++#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
++#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
++#endif
++
++#ifndef GLX_EXT_framebuffer_sRGB
++#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
++#endif
++
++#ifndef GLX_EXT_texture_from_pixmap
++#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
++#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
++#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
++#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
++#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
++#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
++#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
++#define GLX_Y_INVERTED_EXT 0x20D4
++#define GLX_TEXTURE_FORMAT_EXT 0x20D5
++#define GLX_TEXTURE_TARGET_EXT 0x20D6
++#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
++#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
++#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
++#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
++#define GLX_TEXTURE_1D_EXT 0x20DB
++#define GLX_TEXTURE_2D_EXT 0x20DC
++#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
++#define GLX_FRONT_LEFT_EXT 0x20DE
++#define GLX_FRONT_RIGHT_EXT 0x20DF
++#define GLX_BACK_LEFT_EXT 0x20E0
++#define GLX_BACK_RIGHT_EXT 0x20E1
++#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
++#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
++#define GLX_AUX0_EXT 0x20E2
++#define GLX_AUX1_EXT 0x20E3
++#define GLX_AUX2_EXT 0x20E4
++#define GLX_AUX3_EXT 0x20E5
++#define GLX_AUX4_EXT 0x20E6
++#define GLX_AUX5_EXT 0x20E7
++#define GLX_AUX6_EXT 0x20E8
++#define GLX_AUX7_EXT 0x20E9
++#define GLX_AUX8_EXT 0x20EA
++#define GLX_AUX9_EXT 0x20EB
++#endif
++
++
++/*************************************************************/
++
++#ifndef GLX_ARB_get_proc_address
++typedef void (*__GLXextFuncPtr)(void);
++#endif
++
++#ifndef GLX_SGIX_video_source
++typedef XID GLXVideoSourceSGIX;
++#endif
++
++#ifndef GLX_SGIX_fbconfig
++typedef XID GLXFBConfigIDSGIX;
++typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
++#endif
++
++#ifndef GLX_SGIX_pbuffer
++typedef XID GLXPbufferSGIX;
++typedef struct {
++ int type;
++ unsigned long serial; /* # of last request processed by server */
++ Bool send_event; /* true if this came for SendEvent request */
++ Display *display; /* display the event was read from */
++ GLXDrawable drawable; /* i.d. of Drawable */
++ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
++ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
++ unsigned int mask; /* mask indicating which buffers are affected*/
++ int x, y;
++ int width, height;
++ int count; /* if nonzero, at least this many more */
++} GLXBufferClobberEventSGIX;
++#endif
++
++#ifndef GLEXT_64_TYPES_DEFINED
++/* This code block is duplicated in glxext.h, so must be protected */
++#define GLEXT_64_TYPES_DEFINED
++/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
++/* (as used in the GLX_OML_sync_control extension). */
++#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
++#include <inttypes.h>
++#elif defined(__sun__) || defined(__digital__)
++#include <inttypes.h>
++#if defined(__STDC__)
++#if defined(__arch64__)
++typedef long int int64_t;
++typedef unsigned long int uint64_t;
++#else
++typedef long long int int64_t;
++typedef unsigned long long int uint64_t;
++#endif /* __arch64__ */
++#endif /* __STDC__ */
++#elif defined( __VMS )
++#include <inttypes.h>
++#elif defined(__SCO__) || defined(__USLC__)
++#include <stdint.h>
++#elif defined(__UNIXOS2__) || defined(__SOL64__)
++typedef long int int32_t;
++typedef long long int int64_t;
++typedef unsigned long long int uint64_t;
++#elif defined(_WIN32) && defined(__GNUC__)
++#include <stdint.h>
++#elif defined(_WIN32)
++typedef __int32 int32_t;
++typedef __int64 int64_t;
++typedef unsigned __int64 uint64_t;
++#else
++#include <inttypes.h> /* Fallback option */
++#endif
++#endif
++
++#ifndef GLX_VERSION_1_3
++#define GLX_VERSION_1_3 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
++extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
++extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
++extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
++extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
++extern void glXDestroyWindow (Display *, GLXWindow);
++extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
++extern void glXDestroyPixmap (Display *, GLXPixmap);
++extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
++extern void glXDestroyPbuffer (Display *, GLXPbuffer);
++extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
++extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
++extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
++extern GLXDrawable glXGetCurrentReadDrawable (void);
++extern Display * glXGetCurrentDisplay (void);
++extern int glXQueryContext (Display *, GLXContext, int, int *);
++extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
++extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
++typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
++typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
++typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
++typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
++typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
++typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
++typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
++typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
++typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
++typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
++typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
++typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
++typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
++typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
++typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
++typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
++typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
++#endif
++
++#ifndef GLX_VERSION_1_4
++#define GLX_VERSION_1_4 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
++#endif
++
++#ifndef GLX_ARB_get_proc_address
++#define GLX_ARB_get_proc_address 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
++#endif
++
++#ifndef GLX_ARB_multisample
++#define GLX_ARB_multisample 1
++#endif
++
++#ifndef GLX_ARB_fbconfig_float
++#define GLX_ARB_fbconfig_float 1
++#endif
++
++#ifndef GLX_SGIS_multisample
++#define GLX_SGIS_multisample 1
++#endif
++
++#ifndef GLX_EXT_visual_info
++#define GLX_EXT_visual_info 1
++#endif
++
++#ifndef GLX_SGI_swap_control
++#define GLX_SGI_swap_control 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern int glXSwapIntervalSGI (int);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
++#endif
++
++#ifndef GLX_SGI_video_sync
++#define GLX_SGI_video_sync 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern int glXGetVideoSyncSGI (unsigned int *);
++extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
++typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
++#endif
++
++#ifndef GLX_SGI_make_current_read
++#define GLX_SGI_make_current_read 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
++extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
++typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
++#endif
++
++#ifndef GLX_SGIX_video_source
++#define GLX_SGIX_video_source 1
++#ifdef _VL_H
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
++extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
++typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
++#endif /* _VL_H */
++#endif
++
++#ifndef GLX_EXT_visual_rating
++#define GLX_EXT_visual_rating 1
++#endif
++
++#ifndef GLX_EXT_import_context
++#define GLX_EXT_import_context 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Display * glXGetCurrentDisplayEXT (void);
++extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
++extern GLXContextID glXGetContextIDEXT (const GLXContext);
++extern GLXContext glXImportContextEXT (Display *, GLXContextID);
++extern void glXFreeContextEXT (Display *, GLXContext);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
++typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
++typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
++typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
++typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
++#endif
++
++#ifndef GLX_SGIX_fbconfig
++#define GLX_SGIX_fbconfig 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
++extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
++extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
++extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
++extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
++extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
++typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
++typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
++typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
++typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
++typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
++#endif
++
++#ifndef GLX_SGIX_pbuffer
++#define GLX_SGIX_pbuffer 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
++extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
++extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
++extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
++extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
++typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
++typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
++typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
++typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
++#endif
++
++#ifndef GLX_SGI_cushion
++#define GLX_SGI_cushion 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXCushionSGI (Display *, Window, float);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
++#endif
++
++#ifndef GLX_SGIX_video_resize
++#define GLX_SGIX_video_resize 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
++extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
++extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
++extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
++extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
++typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
++typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
++typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
++typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
++#endif
++
++#ifndef GLX_SGIX_dmbuffer
++#define GLX_SGIX_dmbuffer 1
++#ifdef _DM_BUFFER_H_
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
++#endif /* _DM_BUFFER_H_ */
++#endif
++
++#ifndef GLX_SGIX_swap_group
++#define GLX_SGIX_swap_group 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
++#endif
++
++#ifndef GLX_SGIX_swap_barrier
++#define GLX_SGIX_swap_barrier 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
++extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
++typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
++#endif
++
++#ifndef GLX_SUN_get_transparent_index
++#define GLX_SUN_get_transparent_index 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
++#endif
++
++#ifndef GLX_MESA_copy_sub_buffer
++#define GLX_MESA_copy_sub_buffer 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
++#endif
++
++#ifndef GLX_MESA_pixmap_colormap
++#define GLX_MESA_pixmap_colormap 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
++#endif
++
++#ifndef GLX_MESA_release_buffers
++#define GLX_MESA_release_buffers 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
++#endif
++
++#ifndef GLX_MESA_set_3dfx_mode
++#define GLX_MESA_set_3dfx_mode 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXSet3DfxModeMESA (int);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
++#endif
++
++#ifndef GLX_SGIX_visual_select_group
++#define GLX_SGIX_visual_select_group 1
++#endif
++
++#ifndef GLX_OML_swap_method
++#define GLX_OML_swap_method 1
++#endif
++
++#ifndef GLX_OML_sync_control
++#define GLX_OML_sync_control 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
++extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
++extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
++extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
++extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
++typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
++typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
++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);
++typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
++#endif
++
++#ifndef GLX_NV_float_buffer
++#define GLX_NV_float_buffer 1
++#endif
++
++#ifndef GLX_SGIX_hyperpipe
++#define GLX_SGIX_hyperpipe 1
++
++typedef struct {
++ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
++ int networkId;
++} GLXHyperpipeNetworkSGIX;
++
++typedef struct {
++ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
++ int channel;
++ unsigned int
++ participationType;
++ int timeSlice;
++} GLXHyperpipeConfigSGIX;
++
++typedef struct {
++ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
++ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
++ int destXOrigin, destYOrigin, destWidth, destHeight;
++} GLXPipeRect;
++
++typedef struct {
++ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
++ int XOrigin, YOrigin, maxHeight, maxWidth;
++} GLXPipeRectLimits;
++
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
++extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
++extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
++extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
++extern int glXBindHyperpipeSGIX (Display *, int);
++extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
++extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
++extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
++typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
++typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
++typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
++typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
++typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
++typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
++typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
++#endif
++
++#ifndef GLX_MESA_agp_offset
++#define GLX_MESA_agp_offset 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern unsigned int glXGetAGPOffsetMESA (const void *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
++#endif
++
++#ifndef GLX_EXT_fbconfig_packed_float
++#define GLX_EXT_fbconfig_packed_float 1
++#endif
++
++#ifndef GLX_EXT_framebuffer_sRGB
++#define GLX_EXT_framebuffer_sRGB 1
++#endif
++
++#ifndef GLX_EXT_texture_from_pixmap
++#define GLX_EXT_texture_from_pixmap 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
++extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
++typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
++#endif
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+Index: trunk/target-i386/mesa_mipmap.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/mesa_mipmap.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,824 @@
++
++/*
++ * Mesa 3-D graphics library
++ * Version: 3.4
++ * Copyright (C) 1995-2000 Brian Paul
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the Free
++ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++
++#ifdef PC_HEADER
++#include "all.h"
++#else
++#include <assert.h>
++#include <math.h>
++#include <stdio.h>
++#include <stdlib.h>
++//#include "gluP.h"
++#endif
++
++
++/*
++ * Compute ceiling of integer quotient of A divided by B:
++ */
++#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
++
++
++
++#ifdef EPSILON
++#undef EPSILON
++#endif
++#define EPSILON 0.001
++
++
++/* To work around optimizer bug in MSVC4.1 */
++#if defined(__WIN32__) && !defined(OPENSTEP)
++void
++dummy(GLuint j, GLuint k)
++{
++}
++#else
++#define dummy(J, K)
++#endif
++
++
++static GLint GLAPIENTRY
++mesa_gluScaleImage(GLenum format,
++ GLsizei widthin, GLsizei heightin,
++ GLenum typein, const void *datain,
++ GLsizei widthout, GLsizei heightout,
++ GLenum typeout, void *dataout)
++{
++ GLint components, i, j, k;
++ GLfloat *tempin, *tempout;
++ GLfloat sx, sy;
++ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
++ GLint packrowlength, packalignment, packskiprows, packskippixels;
++ GLint sizein, sizeout;
++ GLint rowstride, rowlen;
++
++
++ /* Determine number of components per pixel */
++ switch (format) {
++ case GL_COLOR_INDEX:
++ case GL_STENCIL_INDEX:
++ case GL_DEPTH_COMPONENT:
++ case GL_RED:
++ case GL_GREEN:
++ case GL_BLUE:
++ case GL_ALPHA:
++ case GL_LUMINANCE:
++ components = 1;
++ break;
++ case GL_LUMINANCE_ALPHA:
++ components = 2;
++ break;
++ case GL_RGB:
++ case GL_BGR:
++ components = 3;
++ break;
++ case GL_RGBA:
++ case GL_BGRA:
++#ifdef GL_EXT_abgr
++ case GL_ABGR_EXT:
++#endif
++ components = 4;
++ break;
++ default:
++ return GLU_INVALID_ENUM;
++ }
++
++ /* Determine bytes per input datum */
++ switch (typein) {
++ case GL_UNSIGNED_BYTE:
++ sizein = sizeof(GLubyte);
++ break;
++ case GL_BYTE:
++ sizein = sizeof(GLbyte);
++ break;
++ case GL_UNSIGNED_SHORT:
++ sizein = sizeof(GLushort);
++ break;
++ case GL_SHORT:
++ sizein = sizeof(GLshort);
++ break;
++ case GL_UNSIGNED_INT:
++ sizein = sizeof(GLuint);
++ break;
++ case GL_INT:
++ sizein = sizeof(GLint);
++ break;
++ case GL_FLOAT:
++ sizein = sizeof(GLfloat);
++ break;
++ case GL_BITMAP:
++ /* not implemented yet */
++ default:
++ return GL_INVALID_ENUM;
++ }
++
++ /* Determine bytes per output datum */
++ switch (typeout) {
++ case GL_UNSIGNED_BYTE:
++ sizeout = sizeof(GLubyte);
++ break;
++ case GL_BYTE:
++ sizeout = sizeof(GLbyte);
++ break;
++ case GL_UNSIGNED_SHORT:
++ sizeout = sizeof(GLushort);
++ break;
++ case GL_SHORT:
++ sizeout = sizeof(GLshort);
++ break;
++ case GL_UNSIGNED_INT:
++ sizeout = sizeof(GLuint);
++ break;
++ case GL_INT:
++ sizeout = sizeof(GLint);
++ break;
++ case GL_FLOAT:
++ sizeout = sizeof(GLfloat);
++ break;
++ case GL_BITMAP:
++ /* not implemented yet */
++ default:
++ return GL_INVALID_ENUM;
++ }
++
++ /* Get glPixelStore state */
++ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
++ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
++ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
++ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
++ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
++ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
++ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
++ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
++
++ /* Allocate storage for intermediate images */
++ tempin = (GLfloat *) malloc(widthin * heightin
++ * components * sizeof(GLfloat));
++ if (!tempin) {
++ return GLU_OUT_OF_MEMORY;
++ }
++ tempout = (GLfloat *) malloc(widthout * heightout
++ * components * sizeof(GLfloat));
++ if (!tempout) {
++ free(tempin);
++ return GLU_OUT_OF_MEMORY;
++ }
++
++
++ /*
++ * Unpack the pixel data and convert to floating point
++ */
++
++ if (unpackrowlength > 0) {
++ rowlen = unpackrowlength;
++ }
++ else {
++ rowlen = widthin;
++ }
++ if (sizein >= unpackalignment) {
++ rowstride = components * rowlen;
++ }
++ else {
++ rowstride = unpackalignment / sizein
++ * CEILING(components * rowlen * sizein, unpackalignment);
++ }
++
++ switch (typein) {
++ case GL_UNSIGNED_BYTE:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLubyte *ubptr = (GLubyte *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * ubptr++;
++ }
++ }
++ break;
++ case GL_BYTE:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLbyte *bptr = (GLbyte *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * bptr++;
++ }
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLushort *usptr = (GLushort *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * usptr++;
++ }
++ }
++ break;
++ case GL_SHORT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLshort *sptr = (GLshort *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * sptr++;
++ }
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLuint *uiptr = (GLuint *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * uiptr++;
++ }
++ }
++ break;
++ case GL_INT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLint *iptr = (GLint *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * iptr++;
++ }
++ }
++ break;
++ case GL_FLOAT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLfloat *fptr = (GLfloat *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = *fptr++;
++ }
++ }
++ break;
++ default:
++ return GLU_INVALID_ENUM;
++ }
++
++
++ /*
++ * Scale the image!
++ */
++
++ if (widthout > 1)
++ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
++ else
++ sx = (GLfloat) (widthin - 1);
++ if (heightout > 1)
++ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
++ else
++ sy = (GLfloat) (heightin - 1);
++
++/*#define POINT_SAMPLE*/
++#ifdef POINT_SAMPLE
++ for (i = 0; i < heightout; i++) {
++ GLint ii = i * sy;
++ for (j = 0; j < widthout; j++) {
++ GLint jj = j * sx;
++
++ GLfloat *src = tempin + (ii * widthin + jj) * components;
++ GLfloat *dst = tempout + (i * widthout + j) * components;
++
++ for (k = 0; k < components; k++) {
++ *dst++ = *src++;
++ }
++ }
++ }
++#else
++ if (sx < 1.0 && sy < 1.0) {
++ /* magnify both width and height: use weighted sample of 4 pixels */
++ GLint i0, i1, j0, j1;
++ GLfloat alpha, beta;
++ GLfloat *src00, *src01, *src10, *src11;
++ GLfloat s1, s2;
++ GLfloat *dst;
++
++ for (i = 0; i < heightout; i++) {
++ i0 = i * sy;
++ i1 = i0 + 1;
++ if (i1 >= heightin)
++ i1 = heightin - 1;
++/* i1 = (i+1) * sy - EPSILON;*/
++ alpha = i * sy - i0;
++ for (j = 0; j < widthout; j++) {
++ j0 = j * sx;
++ j1 = j0 + 1;
++ if (j1 >= widthin)
++ j1 = widthin - 1;
++/* j1 = (j+1) * sx - EPSILON; */
++ beta = j * sx - j0;
++
++ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
++ src00 = tempin + (i0 * widthin + j0) * components;
++ src01 = tempin + (i0 * widthin + j1) * components;
++ src10 = tempin + (i1 * widthin + j0) * components;
++ src11 = tempin + (i1 * widthin + j1) * components;
++
++ dst = tempout + (i * widthout + j) * components;
++
++ for (k = 0; k < components; k++) {
++ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
++ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
++ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
++ }
++ }
++ }
++ }
++ else {
++ /* shrink width and/or height: use an unweighted box filter */
++ GLint i0, i1;
++ GLint j0, j1;
++ GLint ii, jj;
++ GLfloat sum, *dst;
++
++ for (i = 0; i < heightout; i++) {
++ i0 = i * sy;
++ i1 = i0 + 1;
++ if (i1 >= heightin)
++ i1 = heightin - 1;
++/* i1 = (i+1) * sy - EPSILON; */
++ for (j = 0; j < widthout; j++) {
++ j0 = j * sx;
++ j1 = j0 + 1;
++ if (j1 >= widthin)
++ j1 = widthin - 1;
++/* j1 = (j+1) * sx - EPSILON; */
++
++ dst = tempout + (i * widthout + j) * components;
++
++ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
++ for (k = 0; k < components; k++) {
++ sum = 0.0;
++ for (ii = i0; ii <= i1; ii++) {
++ for (jj = j0; jj <= j1; jj++) {
++ sum += *(tempin + (ii * widthin + jj) * components + k);
++ }
++ }
++ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
++ *dst++ = sum;
++ }
++ }
++ }
++ }
++#endif
++
++
++ /*
++ * Return output image
++ */
++
++ if (packrowlength > 0) {
++ rowlen = packrowlength;
++ }
++ else {
++ rowlen = widthout;
++ }
++ if (sizeout >= packalignment) {
++ rowstride = components * rowlen;
++ }
++ else {
++ rowstride = packalignment / sizeout
++ * CEILING(components * rowlen * sizeout, packalignment);
++ }
++
++ switch (typeout) {
++ case GL_UNSIGNED_BYTE:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLubyte *ubptr = (GLubyte *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *ubptr++ = (GLubyte) tempout[k++];
++ }
++ }
++ break;
++ case GL_BYTE:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLbyte *bptr = (GLbyte *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *bptr++ = (GLbyte) tempout[k++];
++ }
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLushort *usptr = (GLushort *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *usptr++ = (GLushort) tempout[k++];
++ }
++ }
++ break;
++ case GL_SHORT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLshort *sptr = (GLshort *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *sptr++ = (GLshort) tempout[k++];
++ }
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLuint *uiptr = (GLuint *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *uiptr++ = (GLuint) tempout[k++];
++ }
++ }
++ break;
++ case GL_INT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLint *iptr = (GLint *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *iptr++ = (GLint) tempout[k++];
++ }
++ }
++ break;
++ case GL_FLOAT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLfloat *fptr = (GLfloat *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *fptr++ = tempout[k++];
++ }
++ }
++ break;
++ default:
++ return GLU_INVALID_ENUM;
++ }
++
++
++ /* free temporary image storage */
++ free(tempin);
++ free(tempout);
++
++ return 0;
++}
++
++
++
++/*
++ * Return the largest k such that 2^k <= n.
++ */
++static GLint
++ilog2(GLint n)
++{
++ GLint k;
++
++ if (n <= 0)
++ return 0;
++ for (k = 0; n >>= 1; k++);
++ return k;
++}
++
++
++
++/*
++ * Find the value nearest to n which is also a power of two.
++ */
++static GLint
++round2(GLint n)
++{
++ GLint m;
++
++ for (m = 1; m < n; m *= 2);
++
++ /* m>=n */
++ if (m - n <= n - m / 2) {
++ return m;
++ }
++ else {
++ return m / 2;
++ }
++}
++
++
++/*
++ * Given an pixel format and datatype, return the number of bytes to
++ * store one pixel.
++ */
++static GLint
++bytes_per_pixel(GLenum format, GLenum type)
++{
++ GLint n, m;
++
++ switch (format) {
++ case GL_COLOR_INDEX:
++ case GL_STENCIL_INDEX:
++ case GL_DEPTH_COMPONENT:
++ case GL_RED:
++ case GL_GREEN:
++ case GL_BLUE:
++ case GL_ALPHA:
++ case GL_LUMINANCE:
++ n = 1;
++ break;
++ case GL_LUMINANCE_ALPHA:
++ n = 2;
++ break;
++ case GL_RGB:
++ case GL_BGR:
++ n = 3;
++ break;
++ case GL_RGBA:
++ case GL_BGRA:
++#ifdef GL_EXT_abgr
++ case GL_ABGR_EXT:
++#endif
++ n = 4;
++ break;
++ default:
++ n = 0;
++ }
++
++ switch (type) {
++ case GL_UNSIGNED_BYTE:
++ m = sizeof(GLubyte);
++ break;
++ case GL_BYTE:
++ m = sizeof(GLbyte);
++ break;
++ case GL_BITMAP:
++ m = 1;
++ break;
++ case GL_UNSIGNED_SHORT:
++ m = sizeof(GLushort);
++ break;
++ case GL_SHORT:
++ m = sizeof(GLshort);
++ break;
++ case GL_UNSIGNED_INT:
++ m = sizeof(GLuint);
++ break;
++ case GL_INT:
++ m = sizeof(GLint);
++ break;
++ case GL_FLOAT:
++ m = sizeof(GLfloat);
++ break;
++ default:
++ m = 0;
++ }
++
++ return n * m;
++}
++
++
++
++/*
++ * WARNING: This function isn't finished and has never been tested!!!!
++ */
++GLint GLAPIENTRY
++mesa_gluBuild1DMipmaps(GLenum target, GLint components,
++ GLsizei width, GLenum format, GLenum type, const void *data)
++{
++ GLubyte *texture;
++ GLint levels, max_levels;
++ GLint new_width, max_width;
++ GLint i, j, k, l;
++
++ if (width < 1)
++ return GLU_INVALID_VALUE;
++
++ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
++ max_levels = ilog2(max_width) + 1;
++
++ /* Compute how many mipmap images to make */
++ levels = ilog2(width) + 1;
++ if (levels > max_levels) {
++ levels = max_levels;
++ }
++
++ new_width = 1 << (levels - 1);
++
++ texture = (GLubyte *) malloc(new_width * components);
++ if (!texture) {
++ return GLU_OUT_OF_MEMORY;
++ }
++
++ if (width != new_width) {
++ /* initial rescaling */
++ switch (type) {
++ case GL_UNSIGNED_BYTE:
++ {
++ GLubyte *ub_data = (GLubyte *) data;
++ for (i = 0; i < new_width; i++) {
++ j = i * width / new_width;
++ for (k = 0; k < components; k++) {
++ texture[i * components + k] = ub_data[j * components + k];
++ }
++ }
++ }
++ break;
++ default:
++ /* Not implemented */
++ return GLU_ERROR;
++ }
++ }
++
++ /* generate and load mipmap images */
++ for (l = 0; l < levels; l++) {
++ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
++ format, GL_UNSIGNED_BYTE, texture);
++
++ /* Scale image down to 1/2 size */
++ new_width = new_width / 2;
++ for (i = 0; i < new_width; i++) {
++ for (k = 0; k < components; k++) {
++ GLint sample1, sample2;
++ sample1 = (GLint) texture[i * 2 * components + k];
++ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
++ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
++ }
++ }
++ }
++
++ free(texture);
++
++ return 0;
++}
++
++
++
++GLint GLAPIENTRY
++mesa_gluBuild2DMipmaps(GLenum target, GLint components,
++ GLsizei width, GLsizei height, GLenum format,
++ GLenum type, const void *data)
++{
++ GLint w, h, maxsize;
++ void *image, *newimage;
++ GLint neww, newh, level, bpp;
++ int error;
++ GLboolean done;
++ GLint retval = 0;
++ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
++ GLint packrowlength, packalignment, packskiprows, packskippixels;
++
++ if (width < 1 || height < 1)
++ return GLU_INVALID_VALUE;
++
++ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
++
++ w = round2(width);
++ if (w > maxsize) {
++ w = maxsize;
++ }
++ h = round2(height);
++ if (h > maxsize) {
++ h = maxsize;
++ }
++
++ bpp = bytes_per_pixel(format, type);
++ if (bpp == 0) {
++ /* probably a bad format or type enum */
++ return GLU_INVALID_ENUM;
++ }
++
++ /* Get current glPixelStore values */
++ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
++ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
++ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
++ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
++ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
++ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
++ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
++ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
++
++ /* set pixel packing */
++ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
++ glPixelStorei(GL_PACK_ALIGNMENT, 1);
++ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
++ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
++
++ done = GL_FALSE;
++
++ if (w != width || h != height) {
++ /* must rescale image to get "top" mipmap texture image */
++ image = malloc((w + 4) * h * bpp);
++ if (!image) {
++ return GLU_OUT_OF_MEMORY;
++ }
++ error = mesa_gluScaleImage(format, width, height, type, data,
++ w, h, type, image);
++ if (error) {
++ retval = error;
++ done = GL_TRUE;
++ }
++ }
++ else {
++ image = (void *) data;
++ }
++
++ level = 0;
++ while (!done) {
++ if (image != data) {
++ /* set pixel unpacking */
++ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
++ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
++ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
++ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
++ }
++
++ glTexImage2D(target, level, components, w, h, 0, format, type, image);
++
++ if (w == 1 && h == 1)
++ break;
++
++ neww = (w < 2) ? 1 : w / 2;
++ newh = (h < 2) ? 1 : h / 2;
++ newimage = malloc((neww + 4) * newh * bpp);
++ if (!newimage) {
++ return GLU_OUT_OF_MEMORY;
++ }
++
++ error = mesa_gluScaleImage(format, w, h, type, image,
++ neww, newh, type, newimage);
++ if (error) {
++ retval = error;
++ done = GL_TRUE;
++ }
++
++ if (image != data) {
++ free(image);
++ }
++ image = newimage;
++
++ w = neww;
++ h = newh;
++ level++;
++ }
++
++ if (image != data) {
++ free(image);
++ }
++
++ /* Restore original glPixelStore state */
++ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
++ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
++ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
++ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
++ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
++ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
++ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
++ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
++
++ return retval;
++}
+Index: trunk/target-i386/opengl_exec.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/opengl_exec.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,3931 @@
++/*
++ * Host-side implementation of GL/GLX API
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <assert.h>
++#include <string.h>
++
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++#define GL_GLEXT_PROTOTYPES
++#define GLX_GLXEXT_PROTOTYPES
++
++#include <mesa_gl.h>
++#include <mesa_glx.h>
++
++// TODO
++typedef long unsigned int target_phys_addr_t;
++
++#include "opengl_func.h"
++
++#include "mesa_glu.h"
++#include "mesa_mipmap.c"
++
++#include "../qemu-common.h"
++
++//#define SYSTEMATIC_ERROR_CHECK
++#define BUFFER_BEGINEND
++#define glGetError() 0
++
++#define GET_EXT_PTR(type, funcname, args_decl) \
++ static int detect_##funcname = 0; \
++ static type(*ptr_func_##funcname)args_decl = NULL; \
++ if (detect_##funcname == 0) \
++ { \
++ detect_##funcname = 1; \
++ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
++ assert (ptr_func_##funcname); \
++ }
++
++#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
++ static int detect_##funcname = 0; \
++ static type(*ptr_func_##funcname)args_decl = NULL; \
++ if (detect_##funcname == 0) \
++ { \
++ detect_##funcname = 1; \
++ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
++ }
++
++#ifndef WIN32
++#include <dlfcn.h>
++#endif
++
++static void *get_glu_ptr(const char *name)
++{
++ static void *handle = (void *) -1;
++
++ if (handle == (void *) -1) {
++#ifndef WIN32
++ handle = dlopen("libGLU.so", RTLD_LAZY);
++ if (!handle)
++ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
++#else
++ handle = (void *) LoadLibrary("glu32.dll");
++ if (!handle)
++ fprintf(stderr, "can't load glu32.dll\n");
++#endif
++ }
++ if (handle) {
++#ifndef WIN32
++ return dlsym(handle, name);
++#else
++ return GetProcAddress(handle, name);
++#endif
++ }
++ return NULL;
++}
++
++#define GET_GLU_PTR(type, funcname, args_decl) \
++ static int detect_##funcname = 0; \
++ static type(*ptr_func_##funcname)args_decl = NULL; \
++ if (detect_##funcname == 0) \
++ { \
++ detect_##funcname = 1; \
++ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
++ }
++
++int display_function_call = 0;
++
++static const int defaultAttribList[] = {
++ GLX_RGBA,
++ GLX_RED_SIZE, 1,
++ GLX_GREEN_SIZE, 1,
++ GLX_BLUE_SIZE, 1,
++ GLX_DOUBLEBUFFER,
++ None
++};
++
++static XVisualInfo *get_default_visual(Display *dpy)
++{
++ static XVisualInfo *vis = NULL;
++ XVisualInfo theTemplate;
++ int numVisuals;
++
++ if (vis)
++ return vis;
++ fprintf(stderr, "get_default_visual\n");
++ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
++ * (int*)defaultAttribList); */
++ theTemplate.screen = 0;
++ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
++
++ return vis;
++}
++
++
++static Display *parent_dpy = NULL;
++static Window qemu_parent_window = 0;
++
++static Window active_win = 0; /* FIXME */
++static int active_win_x = 0;
++static int active_win_y = 0;
++
++void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
++{
++ parent_dpy = _dpy;
++ qemu_parent_window = _parent_window;
++ if (active_win)
++ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
++ active_win_y);
++}
++
++static int local_connection = 0;
++void opengl_exec_set_local_connection()
++{
++ local_connection = 1;
++}
++
++static GLXDrawable create_window(Display *dpy, Window local_parent_window,
++ XVisualInfo *vis, const char *name,
++ int x, int y, int width, int height)
++{
++ int scrnum;
++ XSetWindowAttributes attr = { 0 };
++ unsigned long mask;
++ Window root;
++ Window win;
++
++ scrnum = DefaultScreen(dpy);
++ root = RootWindow(dpy, scrnum);
++
++ /* window attributes */
++ attr.background_pixel = 0xff000000;
++ attr.border_pixel = 0;
++ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
++ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
++ attr.save_under = True;
++ // if (local_parent_window == NULL && qemu_parent_window == NULL)
++ attr.override_redirect = True;
++ // else
++ // attr.override_redirect = True;
++ attr.cursor = None;
++ mask =
++ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
++ CWOverrideRedirect | CWSaveUnder;
++
++ if (local_parent_window)
++ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
++ vis->depth, InputOutput, vis->visual, mask, &attr);
++ else if (qemu_parent_window)
++ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
++ vis->depth, InputOutput, vis->visual, mask, &attr);
++ else
++ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
++ InputOutput, vis->visual, mask, &attr);
++
++ /* set hints and properties */
++ {
++ XSizeHints sizehints;
++
++ sizehints.x = x;
++ sizehints.y = y;
++ sizehints.width = width;
++ sizehints.height = height;
++ sizehints.flags = USSize | USPosition;
++ XSetWMNormalHints(dpy, win, &sizehints);
++ XSetStandardProperties(dpy, win, name, name, None,
++ (char **) NULL, 0, &sizehints);
++ }
++
++ XSync(dpy, 0);
++
++ /*
++ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
++ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
++ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
++ * } } */
++
++ /* TODO */
++ if (!active_win)
++ active_win = win;
++
++ return win;
++}
++
++typedef struct {
++ void *key;
++ void *value;
++} Assoc;
++
++#define MAX_HANDLED_PROCESS 100
++#define MAX_ASSOC_SIZE 100
++
++#define MAX_FBCONFIG 10
++
++#include "opengl_utils.h"
++
++#define MAX(a, b) (((a) > (b)) ? (a) : (b))
++
++
++typedef struct {
++ int x;
++ int y;
++ int width;
++ int height;
++ int map_state;
++} WindowPosStruct;
++
++typedef struct {
++ GLbitfield mask;
++ int activeTextureIndex;
++} ClientState;
++
++#define MAX_CLIENT_STATE_STACK_SIZE 16
++
++typedef struct {
++ int ref;
++ int fake_ctxt;
++ int fake_shareList;
++ GLXContext context;
++ GLXDrawable drawable;
++
++ void *vertexPointer;
++ void *normalPointer;
++ void *colorPointer;
++ void *secondaryColorPointer;
++ void *indexPointer;
++ void *texCoordPointer[NB_MAX_TEXTURES];
++ void *edgeFlagPointer;
++ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
++ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
++ void *weightPointer;
++ void *matrixIndexPointer;
++ void *fogCoordPointer;
++ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
++ void *interleavedArrays;
++ void *elementPointerATI;
++
++ int vertexPointerSize;
++ int normalPointerSize;
++ int colorPointerSize;
++ int secondaryColorPointerSize;
++ int indexPointerSize;
++ int texCoordPointerSize[NB_MAX_TEXTURES];
++ int edgeFlagPointerSize;
++ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
++ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
++ int weightPointerSize;
++ int matrixIndexPointerSize;
++ int fogCoordPointerSize;
++ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
++ int interleavedArraysSize;
++ int elementPointerATISize;
++
++ int selectBufferSize;
++ void *selectBufferPtr;
++ int feedbackBufferSize;
++ void *feedbackBufferPtr;
++
++ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
++ int clientStateSp;
++ int activeTextureIndex;
++
++ unsigned int ownTabTextures[32768];
++ unsigned int *tabTextures;
++ RangeAllocator ownTextureAllocator;
++ RangeAllocator *textureAllocator;
++
++ unsigned int ownTabBuffers[32768];
++ unsigned int *tabBuffers;
++ RangeAllocator ownBufferAllocator;
++ RangeAllocator *bufferAllocator;
++
++ unsigned int ownTabLists[32768];
++ unsigned int *tabLists;
++ RangeAllocator ownListAllocator;
++ RangeAllocator *listAllocator;
++
++#ifdef SYSTEMATIC_ERROR_CHECK
++ int last_error;
++#endif
++} GLState;
++
++typedef struct {
++ int process_id;
++ int instr_counter;
++
++ int x, y, width, height;
++ WindowPosStruct currentDrawablePos;
++
++ int next_available_context_number;
++ int next_available_pbuffer_number;
++
++ int nb_states;
++ GLState default_state;
++ GLState **glstates;
++ GLState *current_state;
++
++ int nfbconfig;
++ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
++ int fbconfigs_max[MAX_FBCONFIG];
++ int nfbconfig_total;
++
++ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
++ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
++ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
++ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
++
++ Display *dpy;
++
++ int began;
++ int primitive;
++ int bufsize;
++ int bufstart;
++ arg_t *cmdbuf;
++} ProcessStruct;
++
++static ProcessStruct processes[MAX_HANDLED_PROCESS];
++
++void init_process_tab()
++{
++ memset(processes, 0, sizeof(processes));
++}
++
++#define ARG_TO_CHAR(x) (char)(x)
++#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
++#define ARG_TO_SHORT(x) (short)(x)
++#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
++#define ARG_TO_INT(x) (int)(x)
++#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
++#define ARG_TO_FLOAT(x) (*(float*)&(x))
++#define ARG_TO_DOUBLE(x) (*(double*)(x))
++
++#include "server_stub.c"
++
++/* ---- */
++
++#ifdef BUFFER_BEGINEND
++/* A user of the following two functions must not buffer any calls that
++ * may throw an error (i.e. errors conditions must be checked before
++ * storing in the buffer) or return values. */
++static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
++{
++ arg_t *ret;
++
++ if (unlikely(process->bufstart + elems > process->bufsize)) {
++ process->bufsize = (process->bufsize ?: 0x100) << 1;
++ process->cmdbuf = qemu_realloc(process->cmdbuf,
++ process->bufsize * sizeof(arg_t));
++ }
++
++ ret = process->cmdbuf + process->bufstart;
++ process->bufstart += elems;
++ return ret;
++}
++
++static inline void cmd_buffer_replay(ProcessStruct *process)
++{
++ Signature *sig;
++ int func_number;
++ int ret_int;
++ char ret_char;
++ arg_t *call = process->cmdbuf;
++
++ while (process->bufstart) {
++ func_number = *call ++;
++ sig = (Signature *) tab_opengl_calls[func_number];
++
++ execute_func(func_number, call, &ret_int, &ret_char);
++
++ call += sig->nb_args;
++ process->bufstart -= sig->nb_args + 1;
++ }
++}
++#endif
++
++/* ---- */
++
++typedef void *ClientGLXDrawable;
++static inline ClientGLXDrawable to_drawable(arg_t arg)
++{
++#ifdef TARGET_X86_64
++ if (arg > (unsigned long) -1) {
++ fprintf(stderr, "GLXDrawable too big for this implementation\n");
++ exit(-1);
++ }
++#endif
++ return (void *) (unsigned long) arg;
++}
++
++GLXContext get_association_fakecontext_glxcontext(
++ ProcessStruct *process, int fakecontext)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE &&
++ process->association_fakecontext_glxcontext[i].key; i++)
++ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
++ fakecontext)
++ return (GLXContext)
++ process->association_fakecontext_glxcontext[i].value;
++
++ return NULL;
++}
++
++void set_association_fakecontext_glxcontext(
++ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE &&
++ process->association_fakecontext_glxcontext[i].key; i++)
++ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
++ fakecontext)
++ break;
++
++ if (i < MAX_ASSOC_SIZE) {
++ process->association_fakecontext_glxcontext[i].key =
++ (void *) (long) fakecontext;
++ process->association_fakecontext_glxcontext[i].value =
++ (void *) glxcontext;
++ } else
++ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
++}
++
++void unset_association_fakecontext_glxcontext(
++ ProcessStruct *process, int fakecontext)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE &&
++ process->association_fakecontext_glxcontext[i].key; i++)
++ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
++ fakecontext) {
++ memmove(&process->association_fakecontext_glxcontext[i],
++ &process->association_fakecontext_glxcontext[i + 1],
++ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
++ return;
++ }
++}
++
++/* ---- */
++
++XVisualInfo *get_association_fakecontext_visual(
++ ProcessStruct *process, int fakecontext)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
++ i++)
++ if ((int) (long) process->association_fakecontext_visual[i].key ==
++ fakecontext)
++ return process->association_fakecontext_visual[i].value;
++
++ return NULL;
++}
++
++void set_association_fakecontext_visual(ProcessStruct *process,
++ int fakecontext, XVisualInfo *visual)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
++ i++)
++ if ((int) (long) process->association_fakecontext_visual[i].key ==
++ fakecontext)
++ break;
++
++ if (i < MAX_ASSOC_SIZE) {
++ process->association_fakecontext_visual[i].key =
++ (void *) (long) fakecontext;
++ process->association_fakecontext_visual[i].value = (void *) visual;
++ } else
++ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
++}
++
++/* ---- */
++
++GLXPbuffer get_association_fakepbuffer_pbuffer(
++ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
++{
++ int i;
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_fakepbuffer_pbuffer[i].key; i ++)
++ if ((ClientGLXDrawable)
++ process->association_fakepbuffer_pbuffer[i].key ==
++ fakepbuffer)
++ return (GLXPbuffer)
++ process->association_fakepbuffer_pbuffer[i].value;
++
++ return 0;
++}
++
++void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
++ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE &&
++ process->association_fakepbuffer_pbuffer[i].key; i++)
++ if ((ClientGLXDrawable)
++ process->association_fakepbuffer_pbuffer[i].key ==
++ fakepbuffer)
++ break;
++
++ if (i < MAX_ASSOC_SIZE) {
++ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
++ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
++ } else
++ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
++}
++
++void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
++ ClientGLXDrawable fakepbuffer)
++{
++ int i;
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_fakepbuffer_pbuffer[i].key; i++)
++ if ((ClientGLXDrawable)
++ process->association_fakepbuffer_pbuffer[i].key ==
++ fakepbuffer) {
++ memmove(&process->association_fakepbuffer_pbuffer[i],
++ &process->association_fakepbuffer_pbuffer[i + 1],
++ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
++ return;
++ }
++}
++
++/* ---- */
++
++GLXDrawable get_association_clientdrawable_serverdrawable(
++ ProcessStruct *process, ClientGLXDrawable clientdrawable)
++{
++ int i;
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_clientdrawable_serverdrawable[i].key;
++ i++)
++ if ((ClientGLXDrawable) process->
++ association_clientdrawable_serverdrawable[i].key ==
++ clientdrawable)
++ return (GLXDrawable) process->
++ association_clientdrawable_serverdrawable[i].value;
++
++ return (GLXDrawable) 0;
++}
++
++ClientGLXDrawable get_association_serverdrawable_clientdrawable(
++ ProcessStruct *process, GLXDrawable serverdrawable)
++{
++ int i;
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_clientdrawable_serverdrawable[i].key;
++ i ++)
++ if ((GLXDrawable) process->
++ association_clientdrawable_serverdrawable[i].value ==
++ serverdrawable)
++ return (ClientGLXDrawable)
++ process->association_clientdrawable_serverdrawable[i].key;
++
++ return NULL;
++}
++
++void set_association_clientdrawable_serverdrawable(
++ ProcessStruct *process, ClientGLXDrawable clientdrawable,
++ GLXDrawable serverdrawable)
++{
++ int i;
++
++ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
++ i ++)
++ if ((ClientGLXDrawable) process->
++ association_clientdrawable_serverdrawable[i].key ==
++ clientdrawable)
++ break;
++
++ if (i < MAX_ASSOC_SIZE) {
++ process->association_clientdrawable_serverdrawable[i].key =
++ (void *) clientdrawable;
++ process->association_clientdrawable_serverdrawable[i].value =
++ (void *) serverdrawable;
++ } else
++ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
++}
++
++static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
++{
++ XWindowAttributes window_attributes_return;
++ Window child;
++ int x, y;
++ Window root = DefaultRootWindow(dpy);
++
++ XGetWindowAttributes(dpy, win, &window_attributes_return);
++ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
++ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
++ * window_attributes_return.height); */
++ pos->x = x;
++ pos->y = y;
++ pos->width = window_attributes_return.width;
++ pos->height = window_attributes_return.height;
++ pos->map_state = window_attributes_return.map_state;
++}
++
++static int is_gl_vendor_ati(Display *dpy)
++{
++ static int is_gl_vendor_ati_flag = 0;
++ static int has_init = 0;
++
++ if (has_init == 0) {
++ has_init = 1;
++ is_gl_vendor_ati_flag =
++ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
++ }
++ return is_gl_vendor_ati_flag;
++}
++
++static int get_server_texture(ProcessStruct *process,
++ unsigned int client_texture)
++{
++ unsigned int server_texture = 0;
++
++ if (client_texture < 32768) {
++ server_texture = process->current_state->tabTextures[client_texture];
++ } else {
++ fprintf(stderr, "invalid texture name %d\n", client_texture);
++ }
++ return server_texture;
++}
++
++static int get_server_buffer(ProcessStruct *process,
++ unsigned int client_buffer)
++{
++ unsigned int server_buffer = 0;
++
++ if (client_buffer < 32768) {
++ server_buffer = process->current_state->tabBuffers[client_buffer];
++ } else {
++ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
++ }
++ return server_buffer;
++}
++
++
++static int get_server_list(ProcessStruct *process, unsigned int client_list)
++{
++ unsigned int server_list = 0;
++
++ if (client_list < 32768) {
++ server_list = process->current_state->tabLists[client_list];
++ } else {
++ fprintf(stderr, "invalid list name %d\n", client_list);
++ }
++ return server_list;
++}
++
++GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
++{
++ int i;
++ int nbtotal = 0;
++
++ for (i = 0; i < process->nfbconfig; i++) {
++ assert(client_fbconfig >= 1 + nbtotal);
++ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
++ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
++ }
++ nbtotal += process->fbconfigs_max[i];
++ }
++ return 0;
++}
++
++typedef struct {
++ int attribListLength;
++ int *attribList;
++ XVisualInfo *visInfo;
++} AssocAttribListVisual;
++
++static int nTabAssocAttribListVisual = 0;
++static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
++
++static int _compute_length_of_attrib_list_including_zero(const int *attribList,
++ int
++ booleanMustHaveValue)
++{
++ int i = 0;
++
++ while (attribList[i]) {
++ if (booleanMustHaveValue ||
++ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
++ attribList[i] == GLX_DOUBLEBUFFER ||
++ attribList[i] == GLX_STEREO)) {
++ i += 2;
++ } else {
++ i++;
++ }
++ }
++ return i + 1;
++}
++
++static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
++{
++ if (_attribList == NULL)
++ return 0;
++ int attribListLength =
++ _compute_length_of_attrib_list_including_zero(_attribList, 0);
++ int i;
++
++ int *attribList = malloc(sizeof(int) * attribListLength);
++ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
++
++ i = 0;
++ while (attribList[i]) {
++ if (!
++ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
++ attribList[i] == GLX_DOUBLEBUFFER ||
++ attribList[i] == GLX_STEREO)) {
++ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
++ && getenv("DISABLE_SAMPLE_BUFFERS")) {
++ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
++ attribList[i + 1] = 0;
++ }
++ i += 2;
++ } else {
++ i++;
++ }
++ }
++
++ for (i = 0; i < nTabAssocAttribListVisual; i++) {
++ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
++ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
++ attribListLength * sizeof(int)) == 0) {
++ free(attribList);
++ return (tabAssocAttribListVisual[i].
++ visInfo) ? tabAssocAttribListVisual[i].visInfo->
++ visualid : 0;
++ }
++ }
++ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
++
++ tabAssocAttribListVisual = realloc(
++ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
++ (nTabAssocAttribListVisual + 1));
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
++ attribListLength;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
++ (int *) malloc(sizeof(int) * attribListLength);
++ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
++ attribList, sizeof(int) * attribListLength);
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
++ nTabAssocAttribListVisual++;
++ free(attribList);
++ return (visInfo) ? visInfo->visualid : 0;
++}
++
++static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
++ int visualid)
++{
++ int i, n;
++ XVisualInfo template;
++ XVisualInfo *visInfo;
++
++ for (i = 0; i < nTabAssocAttribListVisual; i++) {
++ if (tabAssocAttribListVisual[i].visInfo &&
++ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
++ return tabAssocAttribListVisual[i].visInfo;
++ }
++ }
++ template.visualid = visualid;
++ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
++ tabAssocAttribListVisual =
++ realloc(tabAssocAttribListVisual,
++ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
++ 1));
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
++ nTabAssocAttribListVisual++;
++ return visInfo;
++}
++
++typedef struct {
++ int x;
++ int y;
++ int width;
++ int height;
++ int xhot;
++ int yhot;
++ int *pixels;
++} ClientCursor;
++
++#if 0
++static ClientCursor client_cursor = { 0 };
++#endif
++
++static void do_glClientActiveTextureARB(int texture)
++{
++ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
++
++ if (ptr_func_glClientActiveTextureARB) {
++ ptr_func_glClientActiveTextureARB(texture);
++ }
++}
++
++#ifdef CURSOR_TRICK
++static void do_glActiveTextureARB(int texture)
++{
++ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
++
++ if (ptr_func_glActiveTextureARB) {
++ ptr_func_glActiveTextureARB(texture);
++ }
++}
++
++static void do_glUseProgramObjectARB(GLhandleARB programObj)
++{
++ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
++
++ if (ptr_func_glUseProgramObjectARB) {
++ ptr_func_glUseProgramObjectARB(programObj);
++ }
++}
++#endif
++
++static void destroy_gl_state(GLState *state)
++{
++ int i;
++
++ if (state->vertexPointer)
++ free(state->vertexPointer);
++ if (state->normalPointer)
++ free(state->normalPointer);
++ if (state->indexPointer)
++ free(state->indexPointer);
++ if (state->colorPointer)
++ free(state->colorPointer);
++ if (state->secondaryColorPointer)
++ free(state->secondaryColorPointer);
++ for (i = 0; i < NB_MAX_TEXTURES; i++) {
++ if (state->texCoordPointer[i])
++ free(state->texCoordPointer[i]);
++ }
++ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
++ if (state->vertexAttribPointer[i])
++ free(state->vertexAttribPointer[i]);
++ }
++ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
++ if (state->vertexAttribPointerNV[i])
++ free(state->vertexAttribPointerNV[i]);
++ }
++ if (state->weightPointer)
++ free(state->weightPointer);
++ if (state->matrixIndexPointer)
++ free(state->matrixIndexPointer);
++ if (state->fogCoordPointer)
++ free(state->fogCoordPointer);
++ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
++ if (state->variantPointerEXT[i])
++ free(state->variantPointerEXT[i]);
++ }
++ if (state->interleavedArrays)
++ free(state->interleavedArrays);
++ if (state->elementPointerATI)
++ free(state->elementPointerATI);
++}
++
++static void init_gl_state(GLState *state)
++{
++ state->textureAllocator = &state->ownTextureAllocator;
++ state->tabTextures = state->ownTabTextures;
++ state->bufferAllocator = &state->ownBufferAllocator;
++ state->tabBuffers = state->ownTabBuffers;
++ state->listAllocator = &state->ownListAllocator;
++ state->tabLists = state->ownTabLists;
++}
++
++/*
++ * Translate the nth element of list from type to GLuint.
++ */
++static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
++{
++ GLbyte *bptr;
++ GLubyte *ubptr;
++ GLshort *sptr;
++ GLushort *usptr;
++ GLint *iptr;
++ GLuint *uiptr;
++ GLfloat *fptr;
++
++ switch (type) {
++ case GL_BYTE:
++ bptr = (GLbyte *) list;
++ return (GLuint) *(bptr + n);
++ case GL_UNSIGNED_BYTE:
++ ubptr = (GLubyte *) list;
++ return (GLuint) *(ubptr + n);
++ case GL_SHORT:
++ sptr = (GLshort *) list;
++ return (GLuint) *(sptr + n);
++ case GL_UNSIGNED_SHORT:
++ usptr = (GLushort *) list;
++ return (GLuint) *(usptr + n);
++ case GL_INT:
++ iptr = (GLint *) list;
++ return (GLuint) *(iptr + n);
++ case GL_UNSIGNED_INT:
++ uiptr = (GLuint *) list;
++ return (GLuint) *(uiptr + n);
++ case GL_FLOAT:
++ fptr = (GLfloat *) list;
++ return (GLuint) *(fptr + n);
++ case GL_2_BYTES:
++ ubptr = ((GLubyte *) list) + 2 * n;
++ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
++ case GL_3_BYTES:
++ ubptr = ((GLubyte *) list) + 3 * n;
++ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
++ (GLuint) *(ubptr + 2);
++ case GL_4_BYTES:
++ ubptr = ((GLubyte *) list) + 4 * n;
++ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
++ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
++ default:
++ return 0;
++ }
++}
++
++void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
++ GLXContext shareList, int fake_shareList)
++{
++ process->glstates =
++ realloc(process->glstates,
++ (process->nb_states + 1) * sizeof(GLState *));
++ process->glstates[process->nb_states] = malloc(sizeof(GLState));
++ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
++ process->glstates[process->nb_states]->ref = 1;
++ process->glstates[process->nb_states]->context = ctxt;
++ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
++ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
++ init_gl_state(process->glstates[process->nb_states]);
++ if (shareList && fake_shareList) {
++ int i;
++
++ for (i = 0; i < process->nb_states; i++) {
++ if (process->glstates[i]->fake_ctxt == fake_shareList) {
++ process->glstates[i]->ref++;
++ process->glstates[process->nb_states]->textureAllocator =
++ process->glstates[i]->textureAllocator;
++ process->glstates[process->nb_states]->tabTextures =
++ process->glstates[i]->tabTextures;
++ process->glstates[process->nb_states]->bufferAllocator =
++ process->glstates[i]->bufferAllocator;
++ process->glstates[process->nb_states]->tabBuffers =
++ process->glstates[i]->tabBuffers;
++ process->glstates[process->nb_states]->listAllocator =
++ process->glstates[i]->listAllocator;
++ process->glstates[process->nb_states]->tabLists =
++ process->glstates[i]->tabLists;
++ break;
++ }
++ }
++ }
++ process->nb_states++;
++}
++
++static ProcessStruct *process;
++
++void do_disconnect_current(void)
++{
++ int i;
++ Display *dpy = process->dpy;
++
++ glXMakeCurrent(dpy, 0, NULL);
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_fakecontext_glxcontext[i].key; i ++) {
++ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
++
++ fprintf(stderr, "Destroy context corresponding to fake_context"
++ " = %ld\n", (long) process->
++ association_fakecontext_glxcontext[i].key);
++ glXDestroyContext(dpy, ctxt);
++ }
++
++ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_fakepbuffer_pbuffer[i].key; i ++) {
++ GLXPbuffer pbuffer = (GLXPbuffer)
++ process->association_fakepbuffer_pbuffer[i].value;
++
++ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
++ " = %ld\n", (long) process->
++ association_fakepbuffer_pbuffer[i].key);
++ if (!is_gl_vendor_ati(dpy))
++ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
++ }
++
++ for (i = 0; i < MAX_ASSOC_SIZE && process->
++ association_clientdrawable_serverdrawable[i].key; i ++) {
++ Window win = (Window) process->
++ association_clientdrawable_serverdrawable[i].value;
++
++ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
++ "= %p\n", (int) win, process->
++ association_clientdrawable_serverdrawable[i].key);
++
++ XDestroyWindow(dpy, win);
++ if (active_win == win)
++ active_win = 0;
++
++ int loop = 1; // 1;
++ while (loop) {
++ while (XPending(dpy) > 0) {
++ XEvent event;
++
++ XNextEvent(dpy, &event);
++ switch (event.type) {
++ case DestroyNotify:
++ {
++ if (((XDestroyWindowEvent *) &event)->window == win)
++ loop = 0;
++ break;
++ }
++ }
++ }
++ break; /* TODO */
++ }
++ }
++
++ for (i = 0; i < process->nb_states; i++) {
++ destroy_gl_state(process->glstates[i]);
++ free(process->glstates[i]);
++ }
++ destroy_gl_state(&process->default_state);
++ free(process->glstates);
++
++ if (process->cmdbuf)
++ qemu_free(process->cmdbuf);
++
++ for (i = 0; &processes[i] != process; i ++);
++ memmove(&processes[i], &processes[i + 1],
++ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
++}
++
++static const int beginend_allowed[GL_N_CALLS] = {
++#undef MAGIC_MACRO
++#define MAGIC_MACRO(name) [name ## _func] = 1,
++#include "gl_beginend.h"
++};
++
++void do_context_switch(Display *dpy, pid_t pid, int call)
++{
++ int i;
++
++ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
++ if (processes[i].process_id == pid) {
++ process = &processes[i];
++ break;
++ } else if (processes[i].process_id == 0) {
++ process = &processes[i];
++ memset(process, 0, sizeof(ProcessStruct));
++ process->process_id = pid;
++ init_gl_state(&process->default_state);
++ process->current_state = &process->default_state;
++ process->dpy = dpy;
++ break;
++ }
++ if (process == NULL) {
++ fprintf(stderr, "Too many processes !\n");
++ exit(-1);
++ }
++
++ switch (call) {
++ case _init32_func:
++ case _init64_func:
++ case _exit_process_func:
++ case glXMakeCurrent_func:
++ /* Do nothing */
++ break;
++
++ default:
++#if 0
++ glFlush();
++ glFinish();
++ glXSwapBuffers(dpy, drawable);
++ if (process->current_state == &process->default_state)
++ /* Where do commands like glViewport go when no drawable or
++ * context are current - i.e. after a call to
++ * glXMakeCurrent(dpy, 0, 0) ? */;
++ else
++#endif
++ glXMakeCurrent(dpy, process->current_state->drawable,
++ process->current_state->context);
++ }
++}
++
++int do_function_call(int func_number, arg_t *args, char *ret_string)
++{
++ char ret_char = 0;
++ int ret_int = 0;
++ const char *ret_str = NULL;
++ Display *dpy = process->dpy;
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int ret_type = signature->ret_type;
++
++ if (parent_dpy)
++ dpy = parent_dpy;
++
++ process->instr_counter++;
++ if (display_function_call)
++ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
++ tab_opengl_calls_name[func_number]);
++
++#ifdef BUFFER_BEGINEND
++ if (process->began) {
++ /* Need to check for any errors now because later we won't have
++ * a chance to report them. */
++ if (beginend_allowed[func_number]) {
++ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
++
++ /* TODO: pointer arguments */
++ buf[0] = func_number;
++ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
++ } else if (likely(func_number == glEnd_func)) {
++ process->began = 0;
++
++ glBegin(process->primitive);
++ cmd_buffer_replay(process);
++ glEnd();
++ } else {
++ /* TODO: properly report */
++#ifdef SYSTEMATIC_ERROR_CHECK
++ process->current_state->last_error = INVALID_OPERATION;
++#endif
++ }
++
++ func_number = -1;
++ }
++#endif
++
++ switch (func_number) {
++ case -1:
++ break;
++
++ case _init_func:
++ *(int *) args[1] = 1;
++ break;
++
++ case _synchronize_func:
++ ret_int = 1;
++ break;
++
++ case _exit_process_func:
++ do_disconnect_current();
++ break;
++
++ case _changeWindowState_func:
++ {
++ ClientGLXDrawable client_drawable = to_drawable(args[0]);
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p\n",
++ (void *) client_drawable);
++
++ GLXDrawable drawable =
++ get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++ if (drawable) {
++ if (args[1] == IsViewable) {
++ WindowPosStruct pos;
++
++ _get_window_pos(dpy, drawable, &pos);
++ if (pos.map_state != args[1]) {
++ XMapWindow(dpy, drawable);
++
++ int loop = 1; // 1;
++
++ while (loop) {
++ while (XPending(dpy) > 0) {
++ XEvent event;
++
++ XNextEvent(dpy, &event);
++ switch (event.type) {
++ case ConfigureNotify:
++ {
++ if (((XConfigureEvent *) &event)->
++ window == drawable) {
++ loop = 0;
++ }
++ break;
++ }
++ }
++ }
++ break; /* TODO */
++ }
++ }
++ }
++ }
++
++ break;
++ }
++
++ case _moveResizeWindow_func:
++ {
++ int *params = (int *) args[1];
++ ClientGLXDrawable client_drawable = to_drawable(args[0]);
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p\n",
++ (void *) client_drawable);
++
++ GLXDrawable drawable =
++ get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++ if (drawable) {
++ WindowPosStruct pos;
++
++ _get_window_pos(dpy, drawable, &pos);
++ if (!
++ (params[0] == pos.x && params[1] == pos.y &&
++ params[2] == pos.width && params[3] == pos.height)) {
++ int redim = !(params[2] == pos.width &&
++ params[3] == pos.height);
++ active_win_x = params[0];
++ active_win_y = params[1];
++
++ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
++ pos.x, pos.y, pos.width, pos.height);
++ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
++ params[0], params[1], params[2], params[3]);
++ XMoveResizeWindow(dpy, drawable, params[0], params[1],
++ params[2], params[3]);
++ int loop = 0; // = 1
++
++ while (loop) {
++ while (XPending(dpy) > 0) {
++ XEvent event;
++
++ XNextEvent(dpy, &event);
++ switch (event.type) {
++ case ConfigureNotify:
++ {
++ if (((XConfigureEvent *) &event)->
++ window == drawable) {
++ loop = 0;
++ }
++ break;
++ }
++ }
++ }
++ }
++ /* The window should have resized by now, but force the
++ * new size anyway. */
++ _get_window_pos(dpy, drawable, &pos);
++ pos.width = params[2];
++ pos.height = params[3];
++ process->currentDrawablePos = pos;
++ // if (getenv("FORCE_GL_VIEWPORT"))
++ if (redim)
++ glViewport(0, 0, pos.width, pos.height);
++ }
++ }
++ break;
++ }
++
++ case _send_cursor_func:
++ {
++#if 0
++ int x = args[0];
++ int y = args[1];
++ int width = args[2];
++ int height = args[3];
++ int xhot = args[4];
++ int yhot = args[5];
++ int *pixels = (int *) args[6];
++
++ client_cursor.x = x;
++ client_cursor.y = y;
++ client_cursor.width = width;
++ client_cursor.height = height;
++ client_cursor.xhot = xhot;
++ client_cursor.yhot = yhot;
++ if (pixels) {
++ client_cursor.pixels =
++ realloc(client_cursor.pixels,
++ client_cursor.width * client_cursor.height *
++ sizeof(int));
++ memcpy(client_cursor.pixels, pixels,
++ client_cursor.width * client_cursor.height *
++ sizeof(int));
++ }
++ int in_window = (x >= 0 && y >= 0 &&
++ x < process->currentDrawablePos.width &&
++ y < process->currentDrawablePos.height);
++ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
++ // "in window" : "not in window");
++#endif
++ break;
++ }
++
++#ifdef BUFFER_BEGINEND
++ case glBegin_func:
++ process->began = 1;
++ process->primitive = args[0];
++ break;
++#endif
++
++ case glXWaitGL_func:
++ {
++ glXWaitGL();
++ ret_int = 0;
++ break;
++ }
++
++ case glXWaitX_func:
++ {
++ glXWaitX();
++ ret_int = 0;
++ break;
++ }
++
++ case glXChooseVisual_func:
++ {
++ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
++ break;
++ }
++
++ case glXQueryExtensionsString_func:
++ {
++ ret_str = glXQueryExtensionsString(dpy, 0);
++ break;
++ }
++
++ case glXQueryServerString_func:
++ {
++ ret_str = glXQueryServerString(dpy, 0, args[2]);
++ break;
++ }
++
++ case glXGetClientString_func:
++ {
++ ret_str = glXGetClientString(dpy, args[1]);
++ break;
++ }
++
++ case glXGetScreenDriver_func:
++ {
++ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
++
++ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
++ break;
++ }
++
++ case glXGetDriverConfig_func:
++ {
++ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
++
++ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
++ break;
++ }
++
++ case glXCreateContext_func:
++ {
++ int visualid = (int) args[1];
++ int fake_shareList = (int) args[2];
++
++ if (1 || display_function_call)
++ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
++ fake_shareList);
++
++ GLXContext shareList = get_association_fakecontext_glxcontext(
++ process, fake_shareList);
++ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
++ GLXContext ctxt;
++
++ if (vis) {
++ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
++ } else {
++ vis = get_default_visual(dpy);
++ int saved_visualid = vis->visualid;
++
++ vis->visualid = visualid ?: saved_visualid;
++ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
++ vis->visualid = saved_visualid;
++ }
++
++ if (ctxt) {
++ int fake_ctxt =++ process->next_available_context_number;
++
++ set_association_fakecontext_visual(process, fake_ctxt, vis);
++ set_association_fakecontext_glxcontext(process,
++ fake_ctxt, ctxt);
++ ret_int = fake_ctxt;
++
++ _create_context(process, ctxt, fake_ctxt, shareList,
++ fake_shareList);
++ } else {
++ ret_int = 0;
++ }
++
++ break;
++ }
++
++
++ case glXCreateNewContext_func:
++ {
++ GET_EXT_PTR(GLXContext, glXCreateNewContext,
++ (Display *, GLXFBConfig, int, GLXContext, int));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ int fake_shareList = args[3];
++ GLXContext shareList = get_association_fakecontext_glxcontext(
++ process, fake_shareList);
++ process->next_available_context_number++;
++ int fake_ctxt = process->next_available_context_number;
++ GLXContext ctxt = ptr_func_glXCreateNewContext(
++ dpy, fbconfig, args[2], shareList, args[4]);
++ set_association_fakecontext_glxcontext(
++ process, fake_ctxt, ctxt);
++ ret_int = fake_ctxt;
++
++ _create_context(process, ctxt, fake_ctxt, shareList,
++ fake_shareList);
++ }
++ break;
++ }
++
++ case glXCopyContext_func:
++ {
++ int fake_src_ctxt = (int) args[1];
++ int fake_dst_ctxt = (int) args[2];
++ GLXContext src_ctxt;
++ GLXContext dst_ctxt;
++
++ if (display_function_call)
++ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
++ fake_src_ctxt, fake_dst_ctxt);
++
++ if (!(src_ctxt = get_association_fakecontext_glxcontext(
++ process, fake_src_ctxt)))
++ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
++ fake_src_ctxt);
++ else
++ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
++ process, fake_dst_ctxt))) {
++ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
++ fake_dst_ctxt);
++ } else
++ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
++
++ break;
++ }
++
++ case glXDestroyContext_func:
++ {
++ int fake_ctxt = (int) args[1];
++
++ if (display_function_call)
++ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
++
++ GLXContext ctxt = get_association_fakecontext_glxcontext(
++ process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
++ (void *) (long) fake_ctxt);
++ } else {
++ int i;
++
++ for (i = 0; i < process->nb_states; i ++) {
++ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
++ if (ctxt == process->current_state->context)
++ process->current_state = &process->default_state;
++
++ int fake_shareList =
++ process->glstates[i]->fake_shareList;
++ process->glstates[i]->ref--;
++ if (process->glstates[i]->ref == 0) {
++ fprintf(stderr,
++ "destroy_gl_state fake_ctxt = %d\n",
++ process->glstates[i]->fake_ctxt);
++ destroy_gl_state(process->glstates[i]);
++ free(process->glstates[i]);
++ memmove(&process->glstates[i],
++ &process->glstates[i + 1],
++ (process->nb_states - i - 1) *
++ sizeof(GLState *));
++ process->nb_states --;
++ }
++
++ if (fake_shareList) {
++ for (i = 0; i < process->nb_states; i++) {
++ if (process->glstates[i]->fake_ctxt ==
++ fake_shareList) {
++ process->glstates[i]->ref--;
++ if (process->glstates[i]->ref == 0) {
++ fprintf(stderr,
++ "destroy_gl_state fake_ctxt = %d\n",
++ process->glstates[i]->
++ fake_ctxt);
++ destroy_gl_state(process->
++ glstates[i]);
++ free(process->glstates[i]);
++ memmove(&process->glstates[i],
++ &process->glstates[i + 1],
++ (process->nb_states - i - 1) *
++ sizeof(GLState *));
++ process->nb_states --;
++ }
++ break;
++ }
++ }
++ }
++
++ glXDestroyContext(dpy, ctxt);
++ unset_association_fakecontext_glxcontext(
++ process, fake_ctxt);
++
++ break;
++ }
++ }
++ }
++ break;
++ }
++
++ case glXQueryVersion_func:
++ {
++ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
++ break;
++ }
++
++ case glGetString_func:
++ {
++ ret_str = (char *) glGetString(args[0]);
++ break;
++ }
++
++ case glXMakeCurrent_func:
++ {
++ int i;
++ ClientGLXDrawable client_drawable = to_drawable(args[1]);
++ GLXDrawable drawable = 0;
++ int fake_ctxt = (int) args[2];
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
++ (void *) client_drawable, fake_ctxt);
++
++ if (client_drawable == 0 && fake_ctxt == 0) {
++ ret_int = glXMakeCurrent(dpy, 0, NULL);
++ process->current_state = &process->default_state;
++ } else if ((drawable = (GLXDrawable)
++ get_association_fakepbuffer_pbuffer(
++ process, client_drawable))) {
++ GLXContext ctxt = get_association_fakecontext_glxcontext(
++ process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
++ fake_ctxt);
++ ret_int = 0;
++ } else
++ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
++ } else {
++ GLXContext ctxt = get_association_fakecontext_glxcontext(
++ process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
++ ret_int = 0;
++ } else {
++ drawable = get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++ if (drawable == 0) {
++ XVisualInfo *vis = get_association_fakecontext_visual(
++ process, fake_ctxt);
++ if (vis == NULL)
++ vis = get_default_visual(dpy);
++ /* if (local_connection) drawable = client_drawable;
++ * else */
++ {
++ if ((int) (long) client_drawable ==
++ RootWindow(dpy, 0) &&
++ local_connection) {
++ drawable = (GLXDrawable) client_drawable;
++ } else {
++ drawable = create_window(
++ dpy, local_connection ?
++ (Window) client_drawable :
++ 0, vis, "", 0, 0, 16, 16);
++ }
++ }
++ set_association_clientdrawable_serverdrawable(process,
++ client_drawable, drawable);
++ }
++
++ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
++ }
++ }
++
++ if (ret_int) {
++ for (i = 0; i < process->nb_states; i ++) {
++ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
++ /* HACK !!! REMOVE */
++ process->current_state = process->glstates[i];
++ process->current_state->drawable = drawable;
++ break;
++ }
++ }
++
++ if (i == process->nb_states) {
++ fprintf(stderr, "error remembering the new context\n");
++ exit(-1);
++ }
++ }
++ break;
++ }
++
++ case glXSwapBuffers_func:
++ {
++ ClientGLXDrawable client_drawable = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p\n", client_drawable);
++
++ GLXDrawable drawable =
++ get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++ if (!drawable) {
++ fprintf(stderr, "unknown client_drawable (%p) !\n",
++ (void *) client_drawable);
++ } else {
++#ifdef CURSOR_TRICK
++ if (client_cursor.pixels && local_connection == 0) {
++ glPushAttrib(GL_ALL_ATTRIB_BITS);
++ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
++
++ glMatrixMode(GL_PROJECTION);
++ glPushMatrix();
++ glLoadIdentity();
++ glOrtho(0, process->currentDrawablePos.width,
++ process->currentDrawablePos.height, 0, -1, 1);
++ glMatrixMode(GL_MODELVIEW);
++ glPushMatrix();
++ glLoadIdentity();
++ glPixelZoom(1, -1);
++
++ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
++ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
++ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
++ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
++ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
++ glShadeModel(GL_SMOOTH);
++
++ glEnable(GL_BLEND);
++ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
++ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
++
++ int i, numUnits;
++
++ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
++ for (i = 0; i < numUnits; i++) {
++ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
++ glDisable(GL_TEXTURE_1D);
++ glDisable(GL_TEXTURE_2D);
++ glDisable(GL_TEXTURE_3D);
++ }
++ glDisable(GL_ALPHA_TEST);
++ glDisable(GL_DEPTH_TEST);
++ glDisable(GL_STENCIL_TEST);
++ glDisable(GL_SCISSOR_TEST);
++ glDisable(GL_FRAGMENT_PROGRAM_ARB);
++ glDisable(GL_VERTEX_PROGRAM_ARB);
++ do_glUseProgramObjectARB(0);
++
++ // memset(client_cursor.pixels, 255, client_cursor.width
++ // * client_cursor.height * sizeof(int));
++
++ glRasterPos2d(client_cursor.x - client_cursor.xhot,
++ client_cursor.y - client_cursor.yhot);
++ glDrawPixels(client_cursor.width, client_cursor.height,
++ GL_BGRA, GL_UNSIGNED_BYTE,
++ client_cursor.pixels);
++
++ glMatrixMode(GL_MODELVIEW);
++ glPopMatrix();
++
++ glMatrixMode(GL_PROJECTION);
++ glPopMatrix();
++
++ glPopClientAttrib();
++ glPopAttrib();
++ }
++#endif
++
++ ////////// HORRIBLE HORRIBLE HACK
++ if (drawable != active_win && active_win) {
++ glXMakeCurrent(dpy, active_win,
++ processes[0].current_state->context);
++ glXSwapBuffers(dpy, active_win);
++ glXMakeCurrent(dpy, process->current_state->drawable,
++ process->current_state->context);
++ }
++ glXSwapBuffers(dpy, drawable);
++ }
++ break;
++ }
++
++ case glXIsDirect_func:
++ {
++ int fake_ctxt = (int) args[1];
++
++ if (display_function_call)
++ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
++ GLXContext ctxt =
++ get_association_fakecontext_glxcontext(process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
++ ret_char = False;
++ } else {
++ ret_char = glXIsDirect(dpy, ctxt);
++ }
++ break;
++ }
++
++ case glXGetConfig_func:
++ {
++ int visualid = args[1];
++ XVisualInfo *vis = NULL;
++
++ if (visualid)
++ vis = get_visual_info_from_visual_id(dpy, visualid);
++ if (vis == NULL)
++ vis = get_default_visual(dpy);
++ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
++ break;
++ }
++
++ case glXGetConfig_extended_func:
++ {
++ int visualid = args[1];
++ int n = args[2];
++ int i;
++ XVisualInfo *vis = NULL;
++ int *attribs = (int *) args[3];
++ int *values = (int *) args[4];
++ int *res = (int *) args[5];
++
++ if (visualid)
++ vis = get_visual_info_from_visual_id(dpy, visualid);
++ if (vis == NULL)
++ vis = get_default_visual(dpy);
++
++ for (i = 0; i < n; i++) {
++ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
++ }
++ break;
++ }
++
++ case glXUseXFont_func:
++ {
++ /* implementation is client-side only :-) */
++ break;
++ }
++
++ case glXQueryExtension_func:
++ {
++ ret_int =
++ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
++ break;
++ }
++
++ case glXChooseFBConfig_func:
++ {
++ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
++ (Display *, int, int *, int *));
++ if (process->nfbconfig == MAX_FBCONFIG) {
++ *(int *) args[3] = 0;
++ ret_int = 0;
++ } else {
++ GLXFBConfig *fbconfigs =
++ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
++ (int *) args[3]);
++ if (fbconfigs) {
++ process->fbconfigs[process->nfbconfig] = fbconfigs;
++ process->fbconfigs_max[process->nfbconfig] =
++ *(int *) args[3];
++ process->nfbconfig++;
++ ret_int = 1 + process->nfbconfig_total;
++ process->nfbconfig_total +=
++ process->fbconfigs_max[process->nfbconfig];
++ } else {
++ ret_int = 0;
++ }
++ }
++ break;
++ }
++
++ case glXChooseFBConfigSGIX_func:
++ {
++ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
++ (Display *, int, int *, int *));
++ if (process->nfbconfig == MAX_FBCONFIG) {
++ *(int *) args[3] = 0;
++ ret_int = 0;
++ } else {
++ GLXFBConfigSGIX *fbconfigs =
++ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
++ (int *) args[2],
++ (int *) args[3]);
++ if (fbconfigs) {
++ process->fbconfigs[process->nfbconfig] = fbconfigs;
++ process->fbconfigs_max[process->nfbconfig] =
++ *(int *) args[3];
++ process->nfbconfig++;
++ ret_int = 1 + process->nfbconfig_total;
++ process->nfbconfig_total +=
++ process->fbconfigs_max[process->nfbconfig];
++ } else {
++ ret_int = 0;
++ }
++ }
++ break;
++ }
++
++ case glXGetFBConfigs_func:
++ {
++ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
++ (Display *, int, int *));
++ if (process->nfbconfig == MAX_FBCONFIG) {
++ *(int *) args[2] = 0;
++ ret_int = 0;
++ } else {
++ GLXFBConfig *fbconfigs =
++ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
++ if (fbconfigs) {
++ process->fbconfigs[process->nfbconfig] = fbconfigs;
++ process->fbconfigs_max[process->nfbconfig] =
++ *(int *) args[2];
++ process->nfbconfig++;
++ ret_int = 1 + process->nfbconfig_total;
++ process->nfbconfig_total +=
++ process->fbconfigs_max[process->nfbconfig];
++ } else {
++ ret_int = 0;
++ }
++ }
++ break;
++ }
++
++ case glXCreatePbuffer_func:
++ {
++ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
++ (Display *, GLXFBConfig, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ GLXPbuffer pbuffer =
++ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
++ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
++ if (pbuffer) {
++ ClientGLXDrawable fake_pbuffer = to_drawable(
++ ++ process->next_available_pbuffer_number);
++
++ set_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer, pbuffer);
++ fprintf(stderr,
++ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
++ fake_pbuffer, (int) (long) pbuffer);
++ ret_int = (int) (long) fake_pbuffer;
++ }
++ }
++ break;
++ }
++
++ case glXCreateGLXPbufferSGIX_func:
++ {
++ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
++ (Display *, GLXFBConfig, int, int, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
++ dpy, fbconfig,
++ args[2], args[3], (int *) args[4]);
++ if (pbuffer) {
++ ClientGLXDrawable fake_pbuffer = to_drawable(
++ ++ process->next_available_pbuffer_number);
++
++ set_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer, pbuffer);
++ ret_int = (int) (long) fake_pbuffer;
++ }
++ }
++ break;
++ }
++
++ case glXDestroyPbuffer_func:
++ {
++ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ } else {
++ if (!is_gl_vendor_ati(dpy))
++ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
++ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
++ }
++ break;
++ }
++
++ case glXDestroyGLXPbufferSGIX_func:
++ {
++ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
++ (Display *, GLXPbuffer));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ } else {
++ if (!is_gl_vendor_ati(dpy))
++ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
++ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
++ }
++ break;
++ }
++
++ case glXBindTexImageATI_func:
++ {
++ GET_EXT_PTR(void, glXBindTexImageATI,
++ (Display *, GLXPbuffer, int));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n",
++ fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr,
++ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ } else {
++ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
++ }
++ break;
++ }
++
++ case glXReleaseTexImageATI_func:
++ {
++ GET_EXT_PTR(void, glXReleaseTexImageATI,
++ (Display *, GLXPbuffer, int));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%d\n",
++ (int) (long) fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr,
++ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
++ (int) (long) fake_pbuffer);
++ } else {
++ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
++ }
++ break;
++ }
++
++ case glXBindTexImageARB_func:
++ {
++ GET_EXT_PTR(Bool, glXBindTexImageARB,
++ (Display *, GLXPbuffer, int));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr,
++ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ ret_int = 0;
++ } else {
++ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
++ }
++ break;
++ }
++
++ case glXReleaseTexImageARB_func:
++ {
++ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
++ (Display *, GLXPbuffer, int));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr,
++ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ ret_int = 0;
++ } else {
++ ret_int =
++ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
++ }
++ break;
++ }
++
++ case glXGetFBConfigAttrib_func:
++ {
++ GET_EXT_PTR(int, glXGetFBConfigAttrib,
++ (Display *, GLXFBConfig, int, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig)
++ ret_int =
++ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
++ (int *) args[3]);
++ break;
++ }
++
++ case glXGetFBConfigAttrib_extended_func:
++ {
++ GET_EXT_PTR(int, glXGetFBConfigAttrib,
++ (Display *, GLXFBConfig, int, int *));
++ int client_fbconfig = args[1];
++ int n = args[2];
++ int i;
++ int *attribs = (int *) args[3];
++ int *values = (int *) args[4];
++ int *res = (int *) args[5];
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ for (i = 0; i < n; i++) {
++ if (fbconfig) {
++ res[i] =
++ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
++ attribs[i], &values[i]);
++ } else {
++ res[i] = 0;
++ }
++ }
++ break;
++ }
++
++ case glXGetFBConfigAttribSGIX_func:
++ {
++ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
++ (Display *, GLXFBConfigSGIX, int, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig)
++ ret_int =
++ ptr_func_glXGetFBConfigAttribSGIX(dpy,
++ (GLXFBConfigSGIX)
++ fbconfig, args[2],
++ (int *) args[3]);
++ break;
++ }
++
++ case glXQueryContext_func:
++ {
++ GET_EXT_PTR(int, glXQueryContext,
++ (Display *, GLXContext, int, int *));
++ int fake_ctxt = (int) args[1];
++
++ if (display_function_call)
++ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
++ GLXContext ctxt =
++ get_association_fakecontext_glxcontext(process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
++ ret_int = 0;
++ } else {
++ ret_int =
++ ptr_func_glXQueryContext(dpy, ctxt, args[2],
++ (int *) args[3]);
++ }
++ break;
++ }
++
++ case glXQueryDrawable_func:
++ {
++ GET_EXT_PTR(void, glXQueryDrawable,
++ (Display *, GLXDrawable, int, int *));
++ ClientGLXDrawable client_drawable = to_drawable(args[1]);
++ GLXDrawable drawable =
++ get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p\n",
++ client_drawable);
++
++ if (!drawable)
++ fprintf(stderr, "invalid client_drawable (%p) !\n",
++ client_drawable);
++ else
++ ptr_func_glXQueryDrawable(dpy, drawable,
++ args[2], (int *) args[3]);
++
++ break;
++ }
++
++ case glXQueryGLXPbufferSGIX_func:
++ {
++ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
++ (Display *, GLXFBConfigSGIX, int, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig)
++ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
++ (GLXFBConfigSGIX) fbconfig,
++ args[2], (int *) args[3]);
++ break;
++ }
++
++ case glXCreateContextWithConfigSGIX_func:
++ {
++ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
++ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ GLXContext shareList = get_association_fakecontext_glxcontext(
++ process, (int) args[3]);
++ process->next_available_context_number++;
++ int fake_ctxt = process->next_available_context_number;
++ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
++ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
++ shareList, args[4]);
++ set_association_fakecontext_glxcontext(
++ process, fake_ctxt, ctxt);
++ ret_int = fake_ctxt;
++ }
++ break;
++ }
++
++ case glXGetVisualFromFBConfig_func:
++ {
++ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
++ (Display *, GLXFBConfig));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ XVisualInfo *vis =
++ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
++ ret_int = (vis) ? vis->visualid : 0;
++ if (vis) {
++ tabAssocAttribListVisual =
++ realloc(tabAssocAttribListVisual,
++ sizeof(AssocAttribListVisual) *
++ (nTabAssocAttribListVisual + 1));
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].
++ attribListLength = 0;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].
++ attribList = NULL;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].
++ visInfo = vis;
++ nTabAssocAttribListVisual++;
++ }
++ if (display_function_call)
++ fprintf(stderr, "visualid = %d\n", ret_int);
++ }
++ break;
++ }
++
++ case glXSwapIntervalSGI_func:
++ {
++ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
++
++ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
++ break;
++ }
++
++ case glXGetProcAddress_fake_func:
++ {
++ if (display_function_call)
++ fprintf(stderr, "%s\n", (char *) args[0]);
++ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
++ break;
++ }
++
++ case glXGetProcAddress_global_fake_func:
++ {
++ int nbElts = args[0];
++ char *huge_buffer = (char *) args[1];
++ char *result = (char *) args[2];
++ int i;
++
++ for (i = 0; i < nbElts; i++) {
++ int len = strlen(huge_buffer);
++
++ result[i] =
++ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
++ NULL;
++ huge_buffer += len + 1;
++ }
++ break;
++ }
++
++/* Begin of texture stuff */
++ case glBindTexture_func:
++ case glBindTextureEXT_func:
++ {
++ int target = args[0];
++ unsigned int client_texture = args[1];
++ unsigned int server_texture;
++
++ if (client_texture == 0) {
++ glBindTexture(target, 0);
++ } else {
++ alloc_value(process->current_state->textureAllocator,
++ client_texture);
++ server_texture =
++ process->current_state->tabTextures[client_texture];
++ if (server_texture == 0) {
++ glGenTextures(1, &server_texture);
++ process->current_state->tabTextures[client_texture] =
++ server_texture;
++ }
++ glBindTexture(target, server_texture);
++ }
++ break;
++ }
++
++ case glGenTextures_fake_func:
++ {
++ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
++ int i;
++ int n = args[0];
++ unsigned int *clientTabTextures = malloc(n * sizeof(int));
++ unsigned int *serverTabTextures = malloc(n * sizeof(int));
++
++ alloc_range(process->current_state->textureAllocator, n,
++ clientTabTextures);
++
++ ptr_func_glGenTextures(n, serverTabTextures);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabTextures[clientTabTextures[i]] =
++ serverTabTextures[i];
++ }
++
++ free(clientTabTextures);
++ free(serverTabTextures);
++ break;
++ }
++
++
++ case glDeleteTextures_func:
++ {
++ GET_EXT_PTR(void, glDeleteTextures,
++ (GLsizei n, const GLuint *textures));
++ int i;
++ int n = args[0];
++ unsigned int *clientTabTextures = (unsigned int *) args[1];
++
++ delete_range(process->current_state->textureAllocator, n,
++ clientTabTextures);
++
++ unsigned int *serverTabTextures = malloc(n * sizeof(int));
++
++ for (i = 0; i < n; i++) {
++ serverTabTextures[i] =
++ get_server_texture(process, clientTabTextures[i]);
++ }
++ ptr_func_glDeleteTextures(n, serverTabTextures);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabTextures[clientTabTextures[i]] = 0;
++ }
++ free(serverTabTextures);
++ break;
++ }
++
++ case glPrioritizeTextures_func:
++ {
++ GET_EXT_PTR(void, glPrioritizeTextures,
++ (GLsizei n, const GLuint *textures,
++ const GLclampf *priorities));
++
++ int i;
++ int n = args[0];
++ unsigned int *textures = (unsigned int *) args[1];
++
++ for (i = 0; i < n; i++) {
++ textures[i] = get_server_texture(process, textures[i]);
++ }
++ ptr_func_glPrioritizeTextures(n, textures,
++ (const GLclampf *) args[2]);
++ break;
++ }
++
++ case glAreTexturesResident_func:
++ {
++ GET_EXT_PTR(void, glAreTexturesResident,
++ (GLsizei n, const GLuint *textures,
++ GLboolean *residences));
++ int i;
++ int n = args[0];
++ unsigned int *textures = (unsigned int *) args[1];
++
++ for (i = 0; i < n; i++) {
++ textures[i] = get_server_texture(process, textures[i]);
++ }
++ ptr_func_glAreTexturesResident(n, textures,
++ (GLboolean *) args[2]);
++ break;
++ }
++
++ case glIsTexture_func:
++ case glIsTextureEXT_func:
++ {
++ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
++ unsigned int client_texture = args[0];
++ unsigned int server_texture =
++ get_server_texture(process, client_texture);
++ if (server_texture)
++ ret_char = ptr_func_glIsTexture(server_texture);
++ else
++ ret_char = 0;
++ break;
++ }
++
++ case glFramebufferTexture1DEXT_func:
++ {
++ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
++ (int, int, int, int, int));
++ unsigned int client_texture = args[3];
++ unsigned int server_texture =
++ get_server_texture(process, client_texture);
++ if (server_texture)
++ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
++ server_texture, args[4]);
++ break;
++ }
++
++ case glFramebufferTexture2DEXT_func:
++ {
++ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
++ (int, int, int, int, int));
++ unsigned int client_texture = args[3];
++ unsigned int server_texture =
++ get_server_texture(process, client_texture);
++ if (server_texture)
++ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
++ server_texture, args[4]);
++ break;
++ }
++
++ case glFramebufferTexture3DEXT_func:
++ {
++ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
++ (int, int, int, int, int, int));
++ unsigned int client_texture = args[3];
++ unsigned int server_texture =
++ get_server_texture(process, client_texture);
++ if (server_texture)
++ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
++ server_texture, args[4],
++ args[5]);
++ break;
++ }
++/* End of texture stuff */
++
++/* Begin of list stuff */
++ case glIsList_func:
++ {
++ unsigned int client_list = args[0];
++ unsigned int server_list = get_server_list(process, client_list);
++
++ if (server_list)
++ ret_char = glIsList(server_list);
++ else
++ ret_char = 0;
++ break;
++ }
++
++ case glDeleteLists_func:
++ {
++ int i;
++ unsigned int first_client = args[0];
++ int n = args[1];
++
++ unsigned int first_server =
++ get_server_list(process, first_client);
++ for (i = 0; i < n; i++) {
++ if (get_server_list(process, first_client + i) !=
++ first_server + i)
++ break;
++ }
++ if (i == n) {
++ glDeleteLists(first_server, n);
++ } else {
++ for (i = 0; i < n; i++) {
++ glDeleteLists(get_server_list(process, first_client + i),
++ 1);
++ }
++ }
++
++ for (i = 0; i < n; i++) {
++ process->current_state->tabLists[first_client + i] = 0;
++ }
++ delete_consecutive_values(process->current_state->listAllocator,
++ first_client, n);
++ break;
++ }
++
++ case glGenLists_fake_func:
++ {
++ int i;
++ int n = args[0];
++ unsigned int server_first = glGenLists(n);
++
++ if (server_first) {
++ unsigned int client_first =
++ alloc_range(process->current_state->listAllocator, n,
++ NULL);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabLists[client_first + i] =
++ server_first + i;
++ }
++ }
++ break;
++ }
++
++ case glNewList_func:
++ {
++ unsigned int client_list = args[0];
++ int mode = args[1];
++
++ alloc_value(process->current_state->listAllocator, client_list);
++ unsigned int server_list = get_server_list(process, client_list);
++
++ if (server_list == 0) {
++ server_list = glGenLists(1);
++ process->current_state->tabLists[client_list] = server_list;
++ }
++ glNewList(server_list, mode);
++ break;
++ }
++
++ case glCallList_func:
++ {
++ unsigned int client_list = args[0];
++ unsigned int server_list = get_server_list(process, client_list);
++
++ glCallList(server_list);
++ break;
++ }
++
++ case glCallLists_func:
++ {
++ int i;
++ int n = args[0];
++ int type = args[1];
++ const GLvoid *lists = (const GLvoid *) args[2];
++ int *new_lists = malloc(sizeof(int) * n);
++
++ for (i = 0; i < n; i++) {
++ new_lists[i] =
++ get_server_list(process, translate_id(i, type, lists));
++ }
++ glCallLists(n, GL_UNSIGNED_INT, new_lists);
++ free(new_lists);
++ break;
++ }
++
++
++/* End of list stuff */
++
++/* Begin of buffer stuff */
++ case glBindBufferARB_func:
++ {
++ GET_EXT_PTR(void, glBindBufferARB, (int, int));
++ int target = args[0];
++ unsigned int client_buffer = args[1];
++ unsigned int server_buffer;
++
++ if (client_buffer == 0) {
++ ptr_func_glBindBufferARB(target, 0);
++ } else {
++ server_buffer = get_server_buffer(process, client_buffer);
++ ptr_func_glBindBufferARB(target, server_buffer);
++ }
++ break;
++ }
++
++ case glGenBuffersARB_fake_func:
++ {
++ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
++ int i;
++ int n = args[0];
++ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
++ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
++
++ alloc_range(process->current_state->bufferAllocator, n,
++ clientTabBuffers);
++
++ ptr_func_glGenBuffersARB(n, serverTabBuffers);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabBuffers[clientTabBuffers[i]] =
++ serverTabBuffers[i];
++ }
++
++ free(clientTabBuffers);
++ free(serverTabBuffers);
++ break;
++ }
++
++
++ case glDeleteBuffersARB_func:
++ {
++ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
++ int i;
++ int n = args[0];
++ unsigned int *clientTabBuffers = (unsigned int *) args[1];
++
++ delete_range(process->current_state->bufferAllocator, n,
++ clientTabBuffers);
++
++ int *serverTabBuffers = malloc(n * sizeof(int));
++
++ for (i = 0; i < n; i++) {
++ serverTabBuffers[i] =
++ get_server_buffer(process, clientTabBuffers[i]);
++ }
++ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
++ }
++ free(serverTabBuffers);
++ break;
++ }
++
++ case glIsBufferARB_func:
++ {
++ GET_EXT_PTR(int, glIsBufferARB, (int));
++ unsigned int client_buffer = args[0];
++ unsigned int server_buffer =
++ get_server_buffer(process, client_buffer);
++ if (server_buffer)
++ ret_int = ptr_func_glIsBufferARB(server_buffer);
++ else
++ ret_int = 0;
++ break;
++ }
++
++/* End of buffer stuff */
++
++ case glShaderSourceARB_fake_func:
++ {
++ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
++ int size = args[1];
++ int i;
++ int acc_length = 0;
++ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
++ int *tab_length = (int *) args[3];
++
++ for (i = 0; i < size; i++) {
++ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
++ acc_length += tab_length[i];
++ }
++ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
++ tab_length);
++ free(tab_prog);
++ break;
++ }
++
++ case glShaderSource_fake_func:
++ {
++ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
++ int size = args[1];
++ int i;
++ int acc_length = 0;
++ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
++ int *tab_length = (int *) args[3];
++
++ for (i = 0; i < size; i++) {
++ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
++ acc_length += tab_length[i];
++ }
++ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
++ free(tab_prog);
++ break;
++ }
++
++ case glVertexPointer_fake_func:
++ {
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset,
++ (void *) args[5], bytes_size);
++ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
++ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
++ glVertexPointer(size, type, stride,
++ process->current_state->vertexPointer);
++ break;
++ }
++
++ case glNormalPointer_fake_func:
++ {
++ int offset = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->normalPointerSize =
++ MAX(process->current_state->normalPointerSize,
++ offset + bytes_size);
++ process->current_state->normalPointer =
++ realloc(process->current_state->normalPointer,
++ process->current_state->normalPointerSize);
++ memcpy(process->current_state->normalPointer + offset,
++ (void *) args[4], bytes_size);
++ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
++ // byte_size=%d\n", type, stride, bytes_size);
++ glNormalPointer(type, stride,
++ process->current_state->normalPointer);
++ break;
++ }
++
++ case glIndexPointer_fake_func:
++ {
++ int offset = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->indexPointerSize =
++ MAX(process->current_state->indexPointerSize,
++ offset + bytes_size);
++ process->current_state->indexPointer =
++ realloc(process->current_state->indexPointer,
++ process->current_state->indexPointerSize);
++ memcpy(process->current_state->indexPointer + offset,
++ (void *) args[4], bytes_size);
++ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
++ // byte_size=%d\n", type, stride, bytes_size);
++ glIndexPointer(type, stride,
++ process->current_state->indexPointer);
++ break;
++ }
++
++ case glEdgeFlagPointer_fake_func:
++ {
++ int offset = args[0];
++ int stride = args[1];
++ int bytes_size = args[2];
++
++ process->current_state->edgeFlagPointerSize =
++ MAX(process->current_state->edgeFlagPointerSize,
++ offset + bytes_size);
++ process->current_state->edgeFlagPointer =
++ realloc(process->current_state->edgeFlagPointer,
++ process->current_state->edgeFlagPointerSize);
++ memcpy(process->current_state->edgeFlagPointer + offset,
++ (void *) args[3], bytes_size);
++ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
++ // bytes_size=%d\n", stride, bytes_size);
++ glEdgeFlagPointer(stride,
++ process->current_state->edgeFlagPointer);
++ break;
++ }
++
++ case glVertexAttribPointerARB_fake_func:
++ {
++ GET_EXT_PTR(void, glVertexAttribPointerARB,
++ (int, int, int, int, int, void *));
++ int offset = args[0];
++ int index = args[1];
++ int size = args[2];
++ int type = args[3];
++ int normalized = args[4];
++ int stride = args[5];
++ int bytes_size = args[6];
++
++ process->current_state->vertexAttribPointerSize[index] =
++ MAX(process->current_state->vertexAttribPointerSize[index],
++ offset + bytes_size);
++ process->current_state->vertexAttribPointer[index] =
++ realloc(process->current_state->vertexAttribPointer[index],
++ process->current_state->
++ vertexAttribPointerSize[index]);
++ memcpy(process->current_state->vertexAttribPointer[index] +
++ offset, (void *) args[7], bytes_size);
++ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
++ stride,
++ process->current_state->
++ vertexAttribPointer[index]);
++ break;
++ }
++
++ case glVertexAttribPointerNV_fake_func:
++ {
++ GET_EXT_PTR(void, glVertexAttribPointerNV,
++ (int, int, int, int, void *));
++ int offset = args[0];
++ int index = args[1];
++ int size = args[2];
++ int type = args[3];
++ int stride = args[4];
++ int bytes_size = args[5];
++
++ process->current_state->vertexAttribPointerNVSize[index] =
++ MAX(process->current_state->vertexAttribPointerNVSize[index],
++ offset + bytes_size);
++ process->current_state->vertexAttribPointerNV[index] =
++ realloc(process->current_state->vertexAttribPointerNV[index],
++ process->current_state->
++ vertexAttribPointerNVSize[index]);
++ memcpy(process->current_state->vertexAttribPointerNV[index] +
++ offset, (void *) args[6], bytes_size);
++ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
++ process->current_state->
++ vertexAttribPointerNV[index]);
++ break;
++ }
++
++ case glColorPointer_fake_func:
++ {
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->colorPointerSize =
++ MAX(process->current_state->colorPointerSize,
++ offset + bytes_size);
++ process->current_state->colorPointer =
++ realloc(process->current_state->colorPointer,
++ process->current_state->colorPointerSize);
++ memcpy(process->current_state->colorPointer + offset,
++ (void *) args[5], bytes_size);
++ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
++ // bytes_size);
++ glColorPointer(size, type, stride,
++ process->current_state->colorPointer);
++
++ break;
++ }
++
++ case glSecondaryColorPointer_fake_func:
++ {
++ GET_EXT_PTR(void, glSecondaryColorPointer,
++ (int, int, int, void *));
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->secondaryColorPointerSize =
++ MAX(process->current_state->secondaryColorPointerSize,
++ offset + bytes_size);
++ process->current_state->secondaryColorPointer =
++ realloc(process->current_state->secondaryColorPointer,
++ process->current_state->secondaryColorPointerSize);
++ memcpy(process->current_state->secondaryColorPointer + offset,
++ (void *) args[5], bytes_size);
++ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
++ // = %d\n", bytes_size);
++ ptr_func_glSecondaryColorPointer(size, type, stride,
++ process->current_state->
++ secondaryColorPointer);
++
++ break;
++ }
++
++ case glPushClientAttrib_func:
++ {
++ int mask = args[0];
++
++ if (process->current_state->clientStateSp <
++ MAX_CLIENT_STATE_STACK_SIZE) {
++ process->current_state->clientStateStack[process->
++ current_state->
++ clientStateSp].mask =
++ mask;
++ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
++ process->current_state->clientStateStack[process->
++ current_state->
++ clientStateSp].
++ activeTextureIndex =
++ process->current_state->activeTextureIndex;
++ }
++ process->current_state->clientStateSp++;
++ }
++ glPushClientAttrib(mask);
++ break;
++ }
++
++ case glPopClientAttrib_func:
++ {
++ if (process->current_state->clientStateSp > 0) {
++ process->current_state->clientStateSp--;
++ if (process->current_state->
++ clientStateStack[process->current_state->clientStateSp].
++ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
++ process->current_state->activeTextureIndex =
++ process->current_state->clientStateStack[process->
++ current_state->
++ clientStateSp].
++ activeTextureIndex;
++ }
++ }
++ glPopClientAttrib();
++ break;
++ }
++
++ case glClientActiveTexture_func:
++ case glClientActiveTextureARB_func:
++ {
++ int activeTexture = args[0];
++
++ process->current_state->activeTextureIndex =
++ activeTexture - GL_TEXTURE0_ARB;
++ do_glClientActiveTextureARB(activeTexture);
++ break;
++ }
++
++ case glTexCoordPointer_fake_func:
++ {
++ int offset = args[0];
++ int index = args[1];
++ int size = args[2];
++ int type = args[3];
++ int stride = args[4];
++ int bytes_size = args[5];
++
++ process->current_state->texCoordPointerSize[index] =
++ MAX(process->current_state->texCoordPointerSize[index],
++ offset + bytes_size);
++ process->current_state->texCoordPointer[index] =
++ realloc(process->current_state->texCoordPointer[index],
++ process->current_state->texCoordPointerSize[index]);
++ memcpy(process->current_state->texCoordPointer[index] + offset,
++ (void *) args[6], bytes_size);
++ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
++ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[index]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glWeightPointerARB_fake_func:
++ {
++ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->weightPointerSize =
++ MAX(process->current_state->weightPointerSize,
++ offset + bytes_size);
++ process->current_state->weightPointer =
++ realloc(process->current_state->weightPointer,
++ process->current_state->weightPointerSize);
++ memcpy(process->current_state->weightPointer + offset,
++ (void *) args[5], bytes_size);
++ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
++ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
++ * bytes_size); */
++ ptr_func_glWeightPointerARB(size, type, stride,
++ process->current_state->
++ weightPointer);
++ break;
++ }
++
++ case glMatrixIndexPointerARB_fake_func:
++ {
++ GET_EXT_PTR(void, glMatrixIndexPointerARB,
++ (int, int, int, void *));
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->matrixIndexPointerSize =
++ MAX(process->current_state->matrixIndexPointerSize,
++ offset + bytes_size);
++ process->current_state->matrixIndexPointer =
++ realloc(process->current_state->matrixIndexPointer,
++ process->current_state->matrixIndexPointerSize);
++ memcpy(process->current_state->matrixIndexPointer + offset,
++ (void *) args[5], bytes_size);
++ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
++ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
++ * bytes_size); */
++ ptr_func_glMatrixIndexPointerARB(size, type, stride,
++ process->current_state->
++ matrixIndexPointer);
++ break;
++ }
++
++ case glFogCoordPointer_fake_func:
++ {
++ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
++ int offset = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->fogCoordPointerSize =
++ MAX(process->current_state->fogCoordPointerSize,
++ offset + bytes_size);
++ process->current_state->fogCoordPointer =
++ realloc(process->current_state->fogCoordPointer,
++ process->current_state->fogCoordPointerSize);
++ memcpy(process->current_state->fogCoordPointer + offset,
++ (void *) args[4], bytes_size);
++ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
++ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
++ ptr_func_glFogCoordPointer(type, stride,
++ process->current_state->
++ fogCoordPointer);
++ break;
++ }
++
++ case glVariantPointerEXT_fake_func:
++ {
++ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
++ int offset = args[0];
++ int id = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->variantPointerEXTSize[id] =
++ MAX(process->current_state->variantPointerEXTSize[id],
++ offset + bytes_size);
++ process->current_state->variantPointerEXT[id] =
++ realloc(process->current_state->variantPointerEXT[id],
++ process->current_state->variantPointerEXTSize[id]);
++ memcpy(process->current_state->variantPointerEXT[id] + offset,
++ (void *) args[5], bytes_size);
++ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
++ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
++ ptr_func_glVariantPointerEXT(id, type, stride,
++ process->current_state->
++ variantPointerEXT[id]);
++ break;
++ }
++
++ case glInterleavedArrays_fake_func:
++ {
++ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
++ int offset = args[0];
++ int format = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->interleavedArraysSize =
++ MAX(process->current_state->interleavedArraysSize,
++ offset + bytes_size);
++ process->current_state->interleavedArrays =
++ realloc(process->current_state->interleavedArrays,
++ process->current_state->interleavedArraysSize);
++ memcpy(process->current_state->interleavedArrays + offset,
++ (void *) args[4], bytes_size);
++ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
++ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
++ ptr_func_glInterleavedArrays(format, stride,
++ process->current_state->
++ interleavedArrays);
++ break;
++ }
++
++ case glElementPointerATI_fake_func:
++ {
++ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
++ int type = args[0];
++ int bytes_size = args[1];
++
++ process->current_state->elementPointerATISize = bytes_size;
++ process->current_state->elementPointerATI =
++ realloc(process->current_state->elementPointerATI,
++ process->current_state->elementPointerATISize);
++ memcpy(process->current_state->elementPointerATI,
++ (void *) args[2], bytes_size);
++ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
++ // byte_size=%d\n", type, bytes_size);
++ ptr_func_glElementPointerATI(type,
++ process->current_state->
++ elementPointerATI);
++ break;
++ }
++
++ case glTexCoordPointer01_fake_func:
++ {
++ int size = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->texCoordPointerSize[0] = bytes_size;
++ process->current_state->texCoordPointer[0] =
++ realloc(process->current_state->texCoordPointer[0],
++ bytes_size);
++ memcpy(process->current_state->texCoordPointer[0],
++ (void *) args[4], bytes_size);
++ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
++ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
++ * bytes_size); */
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glTexCoordPointer012_fake_func:
++ {
++ int size = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->texCoordPointerSize[0] = bytes_size;
++ process->current_state->texCoordPointer[0] =
++ realloc(process->current_state->texCoordPointer[0],
++ bytes_size);
++ memcpy(process->current_state->texCoordPointer[0],
++ (void *) args[4], bytes_size);
++ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
++ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
++ * bytes_size); */
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexAndNormalPointer_fake_func:
++ {
++ int vertexPointerSize = args[0];
++ int vertexPointerType = args[1];
++ int vertexPointerStride = args[2];
++ int normalPointerType = args[3];
++ int normalPointerStride = args[4];
++ int bytes_size = args[5];
++ void *ptr = (void *) args[6];
++
++ process->current_state->vertexPointerSize = bytes_size;
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer, bytes_size);
++ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType,
++ vertexPointerStride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, normalPointerStride,
++ process->current_state->vertexPointer);
++ break;
++ }
++
++ case glVertexNormalPointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ break;
++ }
++
++ case glTuxRacerDrawElements_fake_func:
++ {
++ int mode = args[0];
++ int count = args[1];
++ int isColorEnabled = args[2];
++ void *ptr = (void *) args[3];
++ int stride =
++ 6 * sizeof(float) +
++ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
++ glVertexPointer(3, GL_FLOAT, stride, ptr);
++ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
++ if (isColorEnabled)
++ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
++ ptr + 6 * sizeof(float));
++ glDrawArrays(mode, 0, count);
++ break;
++ }
++
++ case glVertexNormalColorPointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ break;
++ }
++
++ case glVertexColorTexCoord0PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int texCoord1PointerOffset = args[i++];
++ int texCoord1PointerSize = args[i++];
++ int texCoord1PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord1PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int texCoord1PointerOffset = args[i++];
++ int texCoord1PointerSize = args[i++];
++ int texCoord1PointerType = args[i++];
++ int texCoord2PointerOffset = args[i++];
++ int texCoord2PointerSize = args[i++];
++ int texCoord2PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord1PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
++ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord2PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int texCoord1PointerOffset = args[i++];
++ int texCoord1PointerSize = args[i++];
++ int texCoord1PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord1PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int texCoord1PointerOffset = args[i++];
++ int texCoord1PointerSize = args[i++];
++ int texCoord1PointerType = args[i++];
++ int texCoord2PointerOffset = args[i++];
++ int texCoord2PointerSize = args[i++];
++ int texCoord2PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord1PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
++ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord2PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case _glVertexPointer_buffer_func:
++ {
++ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
++ break;
++ }
++
++ case _glNormalPointer_buffer_func:
++ {
++ glNormalPointer(args[0], args[1], (void *) args[2]);
++ break;
++ }
++
++ case _glColorPointer_buffer_func:
++ {
++ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
++ break;
++ }
++
++ case _glSecondaryColorPointer_buffer_func:
++ {
++ GET_EXT_PTR(void, glSecondaryColorPointer,
++ (int, int, int, void *));
++ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
++ (void *) args[3]);
++ break;
++ }
++
++ case _glIndexPointer_buffer_func:
++ {
++ glIndexPointer(args[0], args[1], (void *) args[2]);
++ break;
++ }
++
++ case _glTexCoordPointer_buffer_func:
++ {
++ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
++ break;
++ }
++
++ case _glEdgeFlagPointer_buffer_func:
++ {
++ glEdgeFlagPointer(args[0], (void *) args[1]);
++ break;
++ }
++
++ case _glVertexAttribPointerARB_buffer_func:
++ {
++ GET_EXT_PTR(void, glVertexAttribPointerARB,
++ (int, int, int, int, int, void *));
++ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
++ args[3], args[4],
++ (void *) args[5]);
++ break;
++ }
++
++ case _glWeightPointerARB_buffer_func:
++ {
++ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
++
++ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
++ (void *) args[3]);
++ break;
++ }
++
++ case _glMatrixIndexPointerARB_buffer_func:
++ {
++ GET_EXT_PTR(void, glMatrixIndexPointerARB,
++ (int, int, int, void *));
++ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
++ (void *) args[3]);
++ break;
++ }
++
++ case _glFogCoordPointer_buffer_func:
++ {
++ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
++
++ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
++ break;
++ }
++
++ case _glVariantPointerEXT_buffer_func:
++ {
++ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
++
++ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
++ (void *) args[3]);
++ break;
++ }
++
++ case _glDrawElements_buffer_func:
++ {
++ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
++ break;
++ }
++
++ case _glDrawRangeElements_buffer_func:
++ {
++ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
++ (void *) args[5]);
++ break;
++ }
++
++ case _glMultiDrawElements_buffer_func:
++ {
++ GET_EXT_PTR(void, glMultiDrawElements,
++ (int, int *, int, void **, int));
++ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
++ (void **) args[3], args[4]);
++ break;
++ }
++
++ case _glGetError_fake_func:
++ {
++ break;
++ }
++
++ case glGetIntegerv_func:
++ {
++ glGetIntegerv(args[0], (int *) args[1]);
++ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
++ *(int *) args[1]);
++ break;
++ }
++
++ case _glReadPixels_pbo_func:
++ {
++ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
++ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
++ ARG_TO_UNSIGNED_INT(args[4]),
++ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
++ break;
++ }
++
++ case _glDrawPixels_pbo_func:
++ {
++ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
++ ARG_TO_UNSIGNED_INT(args[2]),
++ ARG_TO_UNSIGNED_INT(args[3]),
++ (const void *) (args[4]));
++ break;
++ }
++
++ case _glMapBufferARB_fake_func:
++ {
++ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
++ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
++ int target = args[0];
++ int size = args[1];
++ void *dst_ptr = (void *) args[2];
++ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
++
++ if (src_ptr) {
++ memcpy(dst_ptr, src_ptr, size);
++ ret_int = ptr_func_glUnmapBufferARB(target);
++ } else {
++ ret_int = 0;
++ }
++ break;
++ }
++
++ case fake_gluBuild2DMipmaps_func:
++ {
++ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
++ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
++ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
++ const GLvoid *arg_6));
++ if (ptr_func_gluBuild2DMipmaps == NULL)
++ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
++ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
++ ARG_TO_INT(args[1]),
++ ARG_TO_INT(args[2]),
++ ARG_TO_INT(args[3]),
++ ARG_TO_UNSIGNED_INT(args[4]),
++ ARG_TO_UNSIGNED_INT(args[5]),
++ (const void *) (args[6]));
++ break;
++ }
++
++ case _glSelectBuffer_fake_func:
++ {
++ process->current_state->selectBufferSize = args[0] * 4;
++ process->current_state->selectBufferPtr =
++ realloc(process->current_state->selectBufferPtr,
++ process->current_state->selectBufferSize);
++ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
++ break;
++ }
++
++ case _glGetSelectBuffer_fake_func:
++ {
++ void *ptr = (void *) args[0];
++
++ memcpy(ptr, process->current_state->selectBufferPtr,
++ process->current_state->selectBufferSize);
++ break;
++ }
++
++ case _glFeedbackBuffer_fake_func:
++ {
++ process->current_state->feedbackBufferSize = args[0] * 4;
++ process->current_state->feedbackBufferPtr =
++ realloc(process->current_state->feedbackBufferPtr,
++ process->current_state->feedbackBufferSize);
++ glFeedbackBuffer(args[0], args[1],
++ process->current_state->feedbackBufferPtr);
++ break;
++ }
++
++ case _glGetFeedbackBuffer_fake_func:
++ {
++ void *ptr = (void *) args[0];
++
++ memcpy(ptr, process->current_state->feedbackBufferPtr,
++ process->current_state->feedbackBufferSize);
++ break;
++ }
++
++ /*
++ * case glEnableClientState_func: { if (display_function_call)
++ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
++ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
++ *
++ * case glDisableClientState_func: { if (display_function_call)
++ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
++ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
++ *
++ * case glClientActiveTexture_func: case
++ * glClientActiveTextureARB_func: { if (display_function_call)
++ * fprintf(stderr, "client activeTexture %d\n", args[0] -
++ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
++ *
++ * case glActiveTextureARB_func: { if (display_function_call)
++ * fprintf(stderr, "server activeTexture %d\n", args[0] -
++ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
++ *
++ * case glLockArraysEXT_func: break;
++ *
++ * case glUnlockArraysEXT_func: break;
++ *
++ * case glArrayElement_func: { glArrayElement(args[0]); break; }
++ *
++ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
++ * break; }
++ *
++ * case glDrawElements_func: {
++ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
++ *
++ * case glDrawRangeElements_func: {
++ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
++ * break; } */
++
++ case glGetError_func:
++ {
++#ifdef SYSTEMATIC_ERROR_CHECK
++ ret_int = process->current_state->last_error;
++#else
++ ret_int = glGetError();
++#endif
++ break;
++ }
++
++ case glNewObjectBufferATI_func:
++ {
++ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
++
++ ret_int = ptr_func_glNewObjectBufferATI(args[0],
++ (void *) args[1], args[2]);
++ break;
++ }
++
++ case glClear_func:
++ /* HACK workaround for an unexplainable issue */
++ if (args[0] & GL_COLOR_BUFFER_BIT)
++ glClear(GL_COLOR_BUFFER_BIT);
++ if (args[0] & GL_STENCIL_BUFFER_BIT)
++ glClear(GL_STENCIL_BUFFER_BIT);
++ if (args[0] & GL_DEPTH_BUFFER_BIT)
++ glClear(GL_DEPTH_BUFFER_BIT);
++ if (args[0] & GL_ACCUM_BUFFER_BIT)
++ glClear(GL_ACCUM_BUFFER_BIT);
++ break;
++
++ default:
++ execute_func(func_number, args, &ret_int, &ret_char);
++ break;
++ }
++
++#ifdef SYSTEMATIC_ERROR_CHECK
++ if (func_number == glGetError_func) {
++ process->current_state->last_error = 0;
++ } else {
++ process->current_state->last_error = glGetError();
++ if (process->current_state->last_error != 0) {
++ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
++ process->current_state->last_error);
++ }
++ }
++#endif
++
++ switch (ret_type) {
++ case TYPE_NONE:
++ break;
++
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_CHAR:
++ ret_int = ret_char;
++ break;
++
++ case TYPE_INT:
++ case TYPE_UNSIGNED_INT:
++ break;
++
++ case TYPE_CONST_CHAR:
++ {
++ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
++ break;
++ }
++
++ default:
++ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
++ exit(-1);
++ break;
++ }
++
++ if (display_function_call)
++ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
++ tab_opengl_calls_name[func_number]);
++
++ return ret_int;
++}
+Index: trunk/target-i386/opengl_func.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/opengl_func.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,1108 @@
++/*
++ * Main header for both host and guest sides
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++#include "mesa_gl.h"
++#include "mesa_glext.h"
++
++/* Argument list are internally of a type that can hold a target pointer
++ * or a host pointer. */
++typedef target_phys_addr_t arg_t;
++
++enum {
++ TYPE_NONE,
++ TYPE_CHAR,
++ TYPE_UNSIGNED_CHAR,
++ TYPE_SHORT,
++ TYPE_UNSIGNED_SHORT,
++ TYPE_INT,
++ TYPE_UNSIGNED_INT,
++ TYPE_FLOAT,
++ TYPE_DOUBLE,
++ TYPE_1CHAR,
++ TYPE_2CHAR,
++ TYPE_3CHAR,
++ TYPE_4CHAR,
++ TYPE_128UCHAR,
++ TYPE_1SHORT,
++ TYPE_2SHORT,
++ TYPE_3SHORT,
++ TYPE_4SHORT,
++ TYPE_1INT,
++ TYPE_2INT,
++ TYPE_3INT,
++ TYPE_4INT,
++ TYPE_1FLOAT,
++ TYPE_2FLOAT,
++ TYPE_3FLOAT,
++ TYPE_4FLOAT,
++ TYPE_16FLOAT,
++ TYPE_1DOUBLE,
++ TYPE_2DOUBLE,
++ TYPE_3DOUBLE,
++ TYPE_4DOUBLE,
++ TYPE_16DOUBLE,
++ TYPE_OUT_1INT,
++ TYPE_OUT_1FLOAT,
++ TYPE_OUT_4CHAR,
++ TYPE_OUT_4INT,
++ TYPE_OUT_4FLOAT,
++ TYPE_OUT_4DOUBLE,
++ TYPE_OUT_128UCHAR,
++ TYPE_CONST_CHAR,
++ TYPE_ARRAY_CHAR,
++ TYPE_ARRAY_SHORT,
++ TYPE_ARRAY_INT,
++ TYPE_ARRAY_FLOAT,
++ TYPE_ARRAY_DOUBLE,
++ TYPE_IN_IGNORED_POINTER,
++ TYPE_OUT_ARRAY_CHAR,
++ TYPE_OUT_ARRAY_SHORT,
++ TYPE_OUT_ARRAY_INT,
++ TYPE_OUT_ARRAY_FLOAT,
++ TYPE_OUT_ARRAY_DOUBLE,
++ TYPE_NULL_TERMINATED_STRING,
++
++ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ /* .... */
++ TYPE_LAST,
++ /* .... */
++ TYPE_1UCHAR = TYPE_CHAR,
++ TYPE_1USHORT = TYPE_1SHORT,
++ TYPE_1UINT = TYPE_1INT,
++ TYPE_OUT_1UINT = TYPE_OUT_1INT,
++ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
++ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
++ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
++ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
++ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
++ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
++ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
++ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
++ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
++ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
++ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
++ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++};
++
++#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
++ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
++
++#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
++ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
++
++#define CASE_IN_UNKNOWN_SIZE_POINTERS \
++ case TYPE_ARRAY_CHAR: \
++ case TYPE_ARRAY_SHORT: \
++ case TYPE_ARRAY_INT: \
++ case TYPE_ARRAY_FLOAT: \
++ case TYPE_ARRAY_DOUBLE
++
++#define CASE_IN_KNOWN_SIZE_POINTERS \
++ case TYPE_1CHAR:\
++ case TYPE_2CHAR:\
++ case TYPE_3CHAR:\
++ case TYPE_4CHAR:\
++ case TYPE_128UCHAR:\
++ case TYPE_1SHORT:\
++ case TYPE_2SHORT:\
++ case TYPE_3SHORT:\
++ case TYPE_4SHORT:\
++ case TYPE_1INT:\
++ case TYPE_2INT:\
++ case TYPE_3INT:\
++ case TYPE_4INT:\
++ case TYPE_1FLOAT:\
++ case TYPE_2FLOAT:\
++ case TYPE_3FLOAT:\
++ case TYPE_4FLOAT:\
++ case TYPE_16FLOAT:\
++ case TYPE_1DOUBLE:\
++ case TYPE_2DOUBLE:\
++ case TYPE_3DOUBLE:\
++ case TYPE_4DOUBLE:\
++ case TYPE_16DOUBLE
++
++#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
++ case TYPE_OUT_ARRAY_CHAR: \
++ case TYPE_OUT_ARRAY_SHORT: \
++ case TYPE_OUT_ARRAY_INT: \
++ case TYPE_OUT_ARRAY_FLOAT: \
++ case TYPE_OUT_ARRAY_DOUBLE
++
++#define CASE_OUT_KNOWN_SIZE_POINTERS \
++ case TYPE_OUT_1INT: \
++ case TYPE_OUT_1FLOAT: \
++ case TYPE_OUT_4CHAR: \
++ case TYPE_OUT_4INT: \
++ case TYPE_OUT_4FLOAT: \
++ case TYPE_OUT_4DOUBLE: \
++ case TYPE_OUT_128UCHAR \
++
++#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
++#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
++
++#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
++#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
++
++
++#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)
++#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)
++#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)
++#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)
++#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)
++
++#define NB_MAX_TEXTURES 16
++#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
++#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
++#define MY_GL_MAX_VARIANT_POINTER_EXT 16
++
++static int tab_args_type_length[] = {
++ 0,
++ sizeof(char),
++ sizeof(unsigned char),
++ sizeof(short),
++ sizeof(unsigned short),
++ sizeof(int),
++ sizeof(unsigned int),
++ sizeof(float),
++ sizeof(double),
++ 1 * sizeof(char),
++ 2 * sizeof(char),
++ 3 * sizeof(char),
++ 4 * sizeof(char),
++ 128 * sizeof(char),
++ 1 * sizeof(short),
++ 2 * sizeof(short),
++ 3 * sizeof(short),
++ 4 * sizeof(short),
++ 1 * sizeof(int),
++ 2 * sizeof(int),
++ 3 * sizeof(int),
++ 4 * sizeof(int),
++ 1 * sizeof(float),
++ 2 * sizeof(float),
++ 3 * sizeof(float),
++ 4 * sizeof(float),
++ 16 * sizeof(float),
++ 1 * sizeof(double),
++ 2 * sizeof(double),
++ 3 * sizeof(double),
++ 4 * sizeof(double),
++ 16 * sizeof(double),
++ sizeof(int),
++ sizeof(float),
++ 4 * sizeof(char),
++ 4 * sizeof(int),
++ 4 * sizeof(float),
++ 4 * sizeof(double),
++ 128 * sizeof(char),
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++
++ /* the following sizes are the size of 1 element of the array */
++ sizeof(char),
++ sizeof(short),
++ sizeof(int),
++ sizeof(float),
++ sizeof(double),
++ sizeof(char),
++ sizeof(short),
++ sizeof(int),
++ sizeof(float),
++ sizeof(double),
++};
++
++typedef struct {
++ int ret_type;
++ int has_out_parameters;
++ int nb_args;
++ int args_type[0];
++} Signature;
++
++static const int _init32_signature[] =
++ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
++static const int _init64_signature[] =
++ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
++
++static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
++
++static const int _serialized_calls_signature[] =
++ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
++
++static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
++
++static const int _changeWindowState_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
++
++static const int _moveResizeWindow_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
++
++static const int _send_cursor_signature[] =
++ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
++ TYPE_INT, TYPE_INT,
++ TYPE_INT, TYPE_INT,
++ TYPE_ARRAY_INT
++};
++
++/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
++static const int glXChooseVisual_signature[] =
++ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
++
++/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
++ GLXContext shareList, Bool direct )*/
++static const int glXCreateContext_signature[] =
++ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
++
++static const int glXCopyContext_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_INT };
++
++/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
++static const int glXDestroyContext_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
++//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
++/* making it asynchronous */
++static const int glXMakeCurrent_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++
++/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
++ int attrib, int *value )*/
++static const int glXGetConfig_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
++static const int glXGetConfig_extended_signature[] =
++ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
++
++/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
++static const int glXSwapBuffers_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
++static const int glXQueryVersion_signature[] =
++ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
++
++/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
++static const int glXQueryExtension_signature[] =
++ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
++
++static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
++static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
++
++/* GLX 1.1 and later */
++
++/* const char *glXGetClientString( Display *dpy, int name ) */
++static const int glXGetClientString_signature[] =
++ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
++static const int glXQueryExtensionsString_signature[] =
++ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
++static const int glXQueryServerString_signature[] =
++ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++
++
++static const int glXGetProcAddress_fake_signature[] =
++ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
++
++static const int glXGetProcAddress_global_fake_signature[] =
++ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
++
++
++/* GLX 1.3 and later */
++
++/*
++GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
++ const int *attribList, int *nitems ); */
++static const int glXChooseFBConfig_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
++TYPE_OUT_1INT };
++
++static const int glXChooseFBConfigSGIX_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
++TYPE_OUT_1INT };
++
++static const int glXGetFBConfigs_signature[] =
++ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
++
++/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
++static const int glXGetFBConfigAttrib_extended_signature[] =
++ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
++
++
++/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
++ const int *attribList ) */
++static const int glXCreatePbuffer_signature[] =
++ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
++
++static const int glXCreateGLXPbufferSGIX_signature[] =
++ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_INT };
++
++static const int glXDestroyPbuffer_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++static const int glXDestroyGLXPbufferSGIX_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/* GLXContext glXCreateNewContext(Display * dpy
++ GLXFBConfig config
++ int renderType
++ GLXContext ShareList
++ Bool Direct) */
++static const int glXCreateNewContext_signature[] =
++ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT };
++
++static const int glXCreateContextWithConfigSGIX_signature[] =
++ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT };
++
++/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
++static const int glXGetVisualFromFBConfig_signature[] =
++ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
++static const int glXGetFBConfigAttrib_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++static const int glXGetFBConfigAttribSGIX_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++static const int glXQueryContext_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++static const int glXQueryGLXPbufferSGIX_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++static const int glXQueryDrawable_signature[] =
++ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++/* void glXUseXFont( Font font, int first, int count, int list ) */
++static const int glXUseXFont_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++
++/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
++static const int glXIsDirect_signature[] =
++ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++static const int glXGetScreenDriver_signature[] =
++ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++static const int glXGetDriverConfig_signature[] =
++ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
++
++
++static const int glXWaitVideoSyncSGI_signature[] =
++ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
++
++static const int glXGetVideoSyncSGI_signature[] =
++ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
++
++static const int glXSwapIntervalSGI_signature[] =
++ { TYPE_INT, 0, 1, TYPE_INT };
++
++static const int glXBindTexImageATI_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++static const int glXReleaseTexImageATI_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++static const int glXBindTexImageARB_signature[] =
++ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++static const int glXReleaseTexImageARB_signature[] =
++ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++
++/* const GLubyte * glGetString( GLenum name ) */
++static const int glGetString_signature[] =
++ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
++
++/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
++/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
++static const int glShaderSourceARB_fake_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
++static const int glShaderSource_fake_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
++
++static const int glVertexPointer_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glNormalPointer_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glColorPointer_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glSecondaryColorPointer_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glIndexPointer_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glTexCoordPointer_fake_signature[] =
++ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glEdgeFlagPointer_fake_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexAttribPointerARB_fake_signature[] =
++ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexAttribPointerNV_fake_signature[] =
++ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glWeightPointerARB_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glMatrixIndexPointerARB_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glFogCoordPointer_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glInterleavedArrays_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glElementPointerATI_fake_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVariantPointerEXT_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glTuxRacerDrawElements_fake_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexAndNormalPointer_fake_signature[] =
++ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glTexCoordPointer01_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glTexCoordPointer012_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glVertexNormalPointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 12, 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 };
++static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, 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 };
++static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++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 };
++static const int
++ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, 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 };
++static const int
++ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++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 };
++static const int
++ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_INT, 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 };
++
++static const int glGenTextures_fake_signature[] =
++ { TYPE_NONE, 0, 1, TYPE_INT };
++static const int glGenBuffersARB_fake_signature[] =
++ { TYPE_NONE, 0, 1, TYPE_INT };
++static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
++
++static const int _glDrawElements_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glDrawRangeElements_buffer_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT };
++static const int _glMultiDrawElements_buffer_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
++TYPE_INT };
++
++static const int _glVertexPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glNormalPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glColorPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glSecondaryColorPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glIndexPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glTexCoordPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glEdgeFlagPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
++static const int _glVertexAttribPointerARB_buffer_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT };
++static const int _glWeightPointerARB_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glMatrixIndexPointerARB_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glFogCoordPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glVariantPointerEXT_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++
++static const int _glReadPixels_pbo_signature[] =
++ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT };
++static const int _glDrawPixels_pbo_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glMapBufferARB_fake_signature[] =
++ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
++
++static const int _glSelectBuffer_fake_signature[] =
++ { TYPE_NONE, 0, 1, TYPE_INT };
++static const int _glGetSelectBuffer_fake_signature[] =
++ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
++static const int _glFeedbackBuffer_fake_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
++static const int _glGetFeedbackBuffer_fake_signature[] =
++ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
++
++static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
++
++#define timesynchro_func -1
++#define memorize_array_func -2
++#define reuse_array_func -3
++
++#include "gl_func.h"
++
++static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
++{
++ switch (pname) {
++ case GL_TEXTURE_MAG_FILTER:
++ case GL_TEXTURE_MIN_FILTER:
++ case GL_TEXTURE_WRAP_S:
++ case GL_TEXTURE_WRAP_T:
++ case GL_TEXTURE_PRIORITY:
++ case GL_TEXTURE_WRAP_R:
++ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
++/* case GL_SHADOW_AMBIENT_SGIX:*/
++ case GL_TEXTURE_MIN_LOD:
++ case GL_TEXTURE_MAX_LOD:
++ case GL_TEXTURE_BASE_LEVEL:
++ case GL_TEXTURE_MAX_LEVEL:
++ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
++ case GL_TEXTURE_LOD_BIAS_S_SGIX:
++ case GL_TEXTURE_LOD_BIAS_T_SGIX:
++ case GL_TEXTURE_LOD_BIAS_R_SGIX:
++ case GL_GENERATE_MIPMAP:
++/* case GL_GENERATE_MIPMAP_SGIS:*/
++ case GL_TEXTURE_COMPARE_SGIX:
++ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
++ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
++ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
++ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
++ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
++ case GL_TEXTURE_LOD_BIAS:
++/* case GL_TEXTURE_LOD_BIAS_EXT:*/
++ case GL_DEPTH_TEXTURE_MODE:
++/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
++ case GL_TEXTURE_COMPARE_MODE:
++/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
++ case GL_TEXTURE_COMPARE_FUNC:
++/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
++ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
++ return 1;
++ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
++ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
++ return 2;
++ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
++ return 3;
++ case GL_TEXTURE_BORDER_COLOR:
++ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
++ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
++ return 4;
++ default:
++ fprintf(err_file, "unhandled pname = %d\n", pname);
++ return 0;
++ }
++}
++
++static int __glLight_size(FILE *err_file, GLenum pname)
++{
++ switch (pname) {
++ case GL_AMBIENT:
++ case GL_DIFFUSE:
++ case GL_SPECULAR:
++ case GL_POSITION:
++ return 4;
++ break;
++
++ case GL_SPOT_DIRECTION:
++ return 3;
++ break;
++
++ case GL_SPOT_EXPONENT:
++ case GL_SPOT_CUTOFF:
++ case GL_CONSTANT_ATTENUATION:
++ case GL_LINEAR_ATTENUATION:
++ case GL_QUADRATIC_ATTENUATION:
++ return 1;
++ break;
++
++ default:
++ fprintf(err_file, "unhandled pname = %d\n", pname);
++ return 0;
++ }
++}
++
++static int __glMaterial_size(FILE *err_file, GLenum pname)
++{
++ switch (pname) {
++ case GL_AMBIENT:
++ case GL_DIFFUSE:
++ case GL_SPECULAR:
++ case GL_EMISSION:
++ case GL_AMBIENT_AND_DIFFUSE:
++ return 4;
++ break;
++
++ case GL_SHININESS:
++ return 1;
++ break;
++
++ case GL_COLOR_INDEXES:
++ return 3;
++ break;
++
++ default:
++ fprintf(err_file, "unhandled pname = %d\n", pname);
++ return 0;
++ }
++}
++
++static inline int compute_arg_length(FILE *err_file, int func_number,
++ int arg_i, arg_t *args)
++{
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int *args_type = signature->args_type;
++
++ switch (func_number) {
++ case glProgramNamedParameter4fNV_func:
++ case glProgramNamedParameter4dNV_func:
++ case glProgramNamedParameter4fvNV_func:
++ case glProgramNamedParameter4dvNV_func:
++ case glGetProgramNamedParameterfvNV_func:
++ case glGetProgramNamedParameterdvNV_func:
++ if (arg_i == 2)
++ return 1 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glProgramStringARB_func:
++ case glLoadProgramNV_func:
++ case glGenProgramsNV_func:
++ case glDeleteProgramsNV_func:
++ case glGenProgramsARB_func:
++ case glDeleteProgramsARB_func:
++ case glRequestResidentProgramsNV_func:
++ case glDrawBuffers_func:
++ case glDrawBuffersARB_func:
++ case glDrawBuffersATI_func:
++ case glDeleteBuffers_func:
++ case glDeleteBuffersARB_func:
++ case glDeleteTextures_func:
++ case glDeleteTexturesEXT_func:
++ case glGenFramebuffersEXT_func:
++ case glDeleteFramebuffersEXT_func:
++ case glGenRenderbuffersEXT_func:
++ case glDeleteRenderbuffersEXT_func:
++ case glGenQueries_func:
++ case glGenQueriesARB_func:
++ case glDeleteQueries_func:
++ case glDeleteQueriesARB_func:
++ case glGenOcclusionQueriesNV_func:
++ case glDeleteOcclusionQueriesNV_func:
++ case glGenFencesNV_func:
++ case glDeleteFencesNV_func:
++ case glUniform1fv_func:
++ case glUniform1iv_func:
++ case glUniform1fvARB_func:
++ case glUniform1ivARB_func:
++ case glUniform1uivEXT_func:
++ case glVertexAttribs1dvNV_func:
++ case glVertexAttribs1fvNV_func:
++ case glVertexAttribs1svNV_func:
++ case glVertexAttribs1hvNV_func:
++ case glWeightbvARB_func:
++ case glWeightsvARB_func:
++ case glWeightivARB_func:
++ case glWeightfvARB_func:
++ case glWeightdvARB_func:
++ case glWeightubvARB_func:
++ case glWeightusvARB_func:
++ case glWeightuivARB_func:
++ case glPixelMapfv_func:
++ case glPixelMapuiv_func:
++ case glPixelMapusv_func:
++ case glProgramBufferParametersfvNV_func:
++ case glProgramBufferParametersIivNV_func:
++ case glProgramBufferParametersIuivNV_func:
++ case glTransformFeedbackAttribsNV_func:
++ case glTransformFeedbackVaryingsNV_func:
++ if (arg_i == signature->nb_args - 1)
++ return 1 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniform2fv_func:
++ case glUniform2iv_func:
++ case glUniform2fvARB_func:
++ case glUniform2ivARB_func:
++ case glUniform2uivEXT_func:
++ case glVertexAttribs2dvNV_func:
++ case glVertexAttribs2fvNV_func:
++ case glVertexAttribs2svNV_func:
++ case glVertexAttribs2hvNV_func:
++ case glDetailTexFuncSGIS_func:
++ case glSharpenTexFuncSGIS_func:
++ if (arg_i == signature->nb_args - 1)
++ return 2 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniform3fv_func:
++ case glUniform3iv_func:
++ case glUniform3fvARB_func:
++ case glUniform3ivARB_func:
++ case glUniform3uivEXT_func:
++ case glVertexAttribs3dvNV_func:
++ case glVertexAttribs3fvNV_func:
++ case glVertexAttribs3svNV_func:
++ case glVertexAttribs3hvNV_func:
++ if (arg_i == signature->nb_args - 1)
++ return 3 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniform4fv_func:
++ case glUniform4iv_func:
++ case glUniform4fvARB_func:
++ case glUniform4ivARB_func:
++ case glUniform4uivEXT_func:
++ case glVertexAttribs4dvNV_func:
++ case glVertexAttribs4fvNV_func:
++ case glVertexAttribs4svNV_func:
++ case glVertexAttribs4hvNV_func:
++ case glVertexAttribs4ubvNV_func:
++ case glProgramParameters4fvNV_func:
++ case glProgramParameters4dvNV_func:
++ case glProgramLocalParameters4fvEXT_func:
++ case glProgramEnvParameters4fvEXT_func:
++ case glProgramLocalParametersI4ivNV_func:
++ case glProgramLocalParametersI4uivNV_func:
++ case glProgramEnvParametersI4ivNV_func:
++ case glProgramEnvParametersI4uivNV_func:
++ if (arg_i == signature->nb_args - 1)
++ return 4 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glPrioritizeTextures_func:
++ case glPrioritizeTexturesEXT_func:
++ case glAreProgramsResidentNV_func:
++ case glAreTexturesResident_func:
++ case glAreTexturesResidentEXT_func:
++ if (arg_i == 1 || arg_i == 2)
++ return args[0] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glLightfv_func:
++ case glLightiv_func:
++ case glGetLightfv_func:
++ case glGetLightiv_func:
++ case glFragmentLightfvSGIX_func:
++ case glFragmentLightivSGIX_func:
++ case glGetFragmentLightfvSGIX_func:
++ case glGetFragmentLightivSGIX_func:
++ if (arg_i == signature->nb_args - 1)
++ return __glLight_size(err_file,
++ args[arg_i -
++ 1]) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glLightModelfv_func:
++ case glLightModeliv_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glFragmentLightModelfvSGIX_func:
++ case glFragmentLightModelivSGIX_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glMaterialfv_func:
++ case glMaterialiv_func:
++ case glGetMaterialfv_func:
++ case glGetMaterialiv_func:
++ case glFragmentMaterialfvSGIX_func:
++ case glFragmentMaterialivSGIX_func:
++ case glGetFragmentMaterialfvSGIX_func:
++ case glGetFragmentMaterialivSGIX_func:
++ if (arg_i == signature->nb_args - 1)
++ return __glMaterial_size(err_file,
++ args[arg_i -
++ 1]) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glTexParameterfv_func:
++ case glTexParameteriv_func:
++ case glGetTexParameterfv_func:
++ case glGetTexParameteriv_func:
++ case glTexParameterIivEXT_func:
++ case glTexParameterIuivEXT_func:
++ case glGetTexParameterIivEXT_func:
++ case glGetTexParameterIuivEXT_func:
++ if (arg_i == signature->nb_args - 1)
++ return __glTexParameter_size(err_file,
++ args[arg_i -
++ 1]) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glFogiv_func:
++ case glFogfv_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_FOG_COLOR) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glTexGendv_func:
++ case glTexGenfv_func:
++ case glTexGeniv_func:
++ case glGetTexGendv_func:
++ case glGetTexGenfv_func:
++ case glGetTexGeniv_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glTexEnvfv_func:
++ case glTexEnviv_func:
++ case glGetTexEnvfv_func:
++ case glGetTexEnviv_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glConvolutionParameterfv_func:
++ case glConvolutionParameteriv_func:
++ case glGetConvolutionParameterfv_func:
++ case glGetConvolutionParameteriv_func:
++ case glConvolutionParameterfvEXT_func:
++ case glConvolutionParameterivEXT_func:
++ case glGetConvolutionParameterfvEXT_func:
++ case glGetConvolutionParameterivEXT_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
++ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
++ args[arg_i - 1] ==
++ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glGetVertexAttribfvARB_func:
++ case glGetVertexAttribfvNV_func:
++ case glGetVertexAttribfv_func:
++ case glGetVertexAttribdvARB_func:
++ case glGetVertexAttribdvNV_func:
++ case glGetVertexAttribdv_func:
++ case glGetVertexAttribivARB_func:
++ case glGetVertexAttribivNV_func:
++ case glGetVertexAttribiv_func:
++ case glGetVertexAttribIivEXT_func:
++ case glGetVertexAttribIuivEXT_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++
++ case glPointParameterfv_func:
++ case glPointParameterfvEXT_func:
++ case glPointParameterfvARB_func:
++ case glPointParameterfvSGIS_func:
++ case glPointParameteriv_func:
++ case glPointParameterivEXT_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix2fv_func:
++ case glUniformMatrix2fvARB_func:
++ if (arg_i == signature->nb_args - 1)
++ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix3fv_func:
++ case glUniformMatrix3fvARB_func:
++ if (arg_i == signature->nb_args - 1)
++ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix4fv_func:
++ case glUniformMatrix4fvARB_func:
++ if (arg_i == signature->nb_args - 1)
++ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix2x3fv_func:
++ case glUniformMatrix3x2fv_func:
++ if (arg_i == signature->nb_args - 1)
++ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix2x4fv_func:
++ case glUniformMatrix4x2fv_func:
++ if (arg_i == signature->nb_args - 1)
++ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix3x4fv_func:
++ case glUniformMatrix4x3fv_func:
++ if (arg_i == signature->nb_args - 1)
++ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glSpriteParameterivSGIX_func:
++ case glSpriteParameterfvSGIX_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ default:
++ break;
++ }
++
++ fprintf(err_file,
++ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
++ func_number, arg_i);
++ return 0;
++}
++
++#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
++ (func_number == glBitmap_func || \
++ func_number == _send_cursor_func || \
++ func_number == glTexImage1D_func || \
++ func_number == glTexImage2D_func || \
++ func_number == glTexImage3D_func || \
++ func_number == glBufferDataARB_func || \
++ func_number == glNewObjectBufferATI_func)
++
++#ifdef __amd64__
++#define _init_func _init64_func
++#else
++#ifdef __i386__
++#define _init_func _init32_func
++#else
++#error Unsupported ABI
++#endif
++#endif
+Index: trunk/target-i386/opengl_player.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/opengl_player.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,1461 @@
++/*
++ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
++ *
++ * Copyright (c) 2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include <assert.h>
++#include <unistd.h>
++#include <sys/time.h>
++#include <math.h>
++
++#include <GL/gl.h>
++#include <X11/Xlib.h>
++
++// TODO
++typedef long unsigned int target_phys_addr_t;
++
++#include "opengl_func.h"
++#include "opengl_utils.h"
++
++//#include "ffmpeg/avcodec.h"
++
++extern void init_process_tab(void);
++extern int do_function_call(int, arg_t *, char *);
++
++void do_disconnect_current(void);
++void do_context_switch(Display *dpy, pid_t pid, int call);
++
++typedef struct {
++ int n_used;
++ unsigned int crc;
++ int size;
++ long long last_use;
++} RecordBufferedArray;
++
++typedef struct {
++ int size;
++ long file_offset;
++} ReplayBufferedArray;
++
++#define N_BUFFERED_ARRAYS 1024
++RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
++
++#define INSTR_WINDOW_SIZE 65536
++short instrWindow[INSTR_WINDOW_SIZE];
++int instrWindowCount = 0;
++int instrWindowPtr = 0;
++int instrWindowBeginPtr = 0;
++
++#include "ghash.c"
++
++#define PRIME 131
++
++typedef struct {
++ int iFirstOccur;
++ int nbOccur;
++ int hash;
++} SeqDesc;
++
++typedef struct {
++ int hash;
++ int offset;
++} HashElt;
++
++int sort_hash_N;
++short *sort_hash_tab;
++int count_compar;
++int collision_detected;
++
++static int sort_hash(const void *ptrA, const void *ptrB)
++{
++ const HashElt *a = (const HashElt *) ptrA;
++ const HashElt *b = (const HashElt *) ptrB;
++
++ count_compar++;
++ if (a->hash == b->hash) {
++ int j;
++
++ for (j = 0; j < sort_hash_N; j++) {
++ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
++ collision_detected = 1;
++ // fprintf(stderr, "collision de hash !\n");
++ return sort_hash_tab[a->offset + j] <
++ sort_hash_tab[b->offset + j] ? -1 : 1;
++ }
++ }
++ return a->offset - b->offset;
++ } else if (a->hash < b->hash)
++ return -1;
++ else
++ return 1;
++}
++
++static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
++{
++ const SeqDesc *a = (const SeqDesc *) ptrA;
++ const SeqDesc *b = (const SeqDesc *) ptrB;
++
++ return b->nbOccur - a->nbOccur;
++}
++
++static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
++{
++ const SeqDesc *a = (const SeqDesc *) ptrA;
++ const SeqDesc *b = (const SeqDesc *) ptrB;
++
++ return a->iFirstOccur - b->iFirstOccur;
++}
++
++void find_repeated_seq(short *tab, int iStart, int length)
++{
++ // SimpleHashTable* tableHash = simple_hash_table_new(free);
++ int N = 10;
++ int i;
++ int hash = 0;
++ int primeN = 1;
++ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
++
++ short *new_tab = malloc(sizeof(short) * length);
++ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
++ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
++ tab = new_tab;
++
++ sort_hash_N = N;
++ sort_hash_tab = tab;
++
++ fprintf(stderr, "(start) iStart = %d\n", iStart);
++ for (i = 0; i < N; i++) {
++ primeN *= PRIME;
++ }
++ for (i = 0; i < length; i++) {
++ hash = hash * PRIME + tab[i];
++ if (i >= N) {
++ hash -= tab[i - N] * primeN;
++ }
++ if (i >= N - 1) {
++ tabHash[i - (N - 1)].offset = i - (N - 1);
++ tabHash[i - (N - 1)].hash =
++ /* (i == 100) ? tabHash[0].hash : */ hash;
++#if 0
++ void **p_n_occurences =
++ simple_hash_table_lookup_pointer(tableHash, hash);
++ if (p_n_occurences == NULL) {
++ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
++
++ seqDesc->iFirstOccur = i - (N - 1);
++ seqDesc->nbOccur = 1;
++ simple_hash_table_insert(tableHash, hash, seqDesc);
++ } else {
++ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
++ int j;
++
++ for (j = 0; j < N; j++) {
++ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
++ tab[(iStart + i - (N - 1) + j) % length])
++ break;
++ }
++ if (j != N)
++ fprintf(stderr, "arg\n");
++ seqDesc->nbOccur++;
++ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
++ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
++ // seqDesc->nbOccur);
++ }
++#endif
++ }
++ }
++ collision_detected = 0;
++ count_compar = 0;
++ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
++ if (!collision_detected) {
++ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
++ int nbSeqDesc = 0;
++ int lastI = 0;
++ int prevHash = tabHash[0].hash;
++
++ for (i = 1; i < length - N + 1; i++) {
++ if (tabHash[i].hash != prevHash) {
++ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
++ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
++ tabSeqDesc[nbSeqDesc].hash = prevHash;
++ nbSeqDesc++;
++ lastI = i;
++ prevHash = tabHash[i].hash;
++ }
++ }
++ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
++ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
++ nbSeqDesc++;
++ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
++ for (i = 0; i < nbSeqDesc; i++) {
++ if (tabSeqDesc[i].nbOccur < 10)
++ break;
++ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
++ // tabSeqDesc[i].nbOccur);
++ }
++ nbSeqDesc = i;
++ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
++ sort_seq_desc_by_offset);
++ lastI = tabSeqDesc[0].iFirstOccur;
++ int maxI = 0;
++ int j = 0;
++
++ for (i = 1; i < nbSeqDesc; i++) {
++ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
++ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
++ maxI = i;
++ }
++ } else {
++ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
++ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
++ j++;
++#define MAX(a,b) (((a)>(b)) ? (a) : (b))
++ lastI = tabSeqDesc[maxI].iFirstOccur;
++ while (i < nbSeqDesc &&
++ tabSeqDesc[i].iFirstOccur - lastI <= N)
++ i++;
++ if (i == nbSeqDesc)
++ break;
++ maxI = i;
++ }
++ }
++ nbSeqDesc = j;
++ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
++ for (i = 0; i < nbSeqDesc; i++) {
++ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
++ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
++ tabSeqDesc[i].hash);
++ for (j = 0; j < N; j++)
++ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
++ fprintf(stderr, "\n");
++ }
++ free(tabSeqDesc);
++ } else {
++ fprintf(stderr, "collision de hash !\n");
++ }
++
++ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
++ count_compar);
++ // simple_hash_table_foreach(tableHash,
++ free(tabHash);
++ free(tab);
++#if 0
++ simple_hash_table_destroy(tableHash);
++#endif
++#if 0
++ int i, j, k;
++
++ for (i = 0; i < length; i++) {
++ int nMaxContiguous = 0;
++ int jMax = 0;
++
++ for (j = 0; j < length; j++) {
++ int nContiguous = 0;
++
++ for (k = 0; k < j - i; k++) {
++ if (tab[(iStart + i + k) % length] ==
++ tab[(iStart + i + j + k) % length]) {
++ nContiguous++;
++ } else
++ break;
++ }
++ if (nContiguous >= nMaxContiguous) {
++ nMaxContiguous = nContiguous;
++ jMax = j;
++ }
++ }
++ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
++ iStart, i, i + jMax, nMaxContiguous);
++ }
++#endif
++}
++
++#define MAX_SERVER_STATE_STACK_SIZE 16
++
++typedef struct {
++ GLbitfield mask;
++ int matrixMode;
++ int lastMatrixOp;
++} ServerState;
++
++typedef struct {
++ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
++ int stackAttribPtr;
++ int matrixMode;
++ int lastMatrixOp;
++} GLState;
++
++#define NB_STATES 100
++GLState states[NB_STATES];
++
++void usage()
++{
++ printf("Usage : opengl_player [OPTION] filename\n\n");
++ printf
++ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
++ printf("'-' is supported and stands for standard input\n\n");
++ printf("The following options are available :\n");
++ printf
++ ("--debug : output debugging trace on stderr\n");
++ printf("--disable-real-time-play-back : play as fast as possible\n");
++ printf
++ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
++ printf("--h or --help : display this help\n");
++}
++
++int main(int argc, char *argv[])
++{
++ static int args_size[50];
++ int i;
++ int visualid_fbconfig_read = -1;
++ int visualid_fbconfig_real = 0;
++ char *filename = "/tmp/debug_gl.bin";
++ int slowdown = 0;
++ int debug = 0;
++ char *ret_string;
++ arg_t args[50];
++ struct timeval start_time, last_time, current_time;
++ int noplay = 0;
++ int count_last_time = 0, count_current = 0;
++ int refresh_rate = 500;
++ int disable_real_time_play_back = 0;
++ int show_hard_disk_bandwith = 0;
++ int last_offset = 0;
++ int resize = 0;
++ int window_width = 0, window_height = 0;
++ int orig_window_width = 0;
++ int show_offset = 0;
++ int show_diff_offset = 0;
++ int last_cmd_offset = 0;
++ FILE *compressed_file = NULL;
++ int sizeBufferedArraysPlay = 0;
++ ReplayBufferedArray *replayBufferedArrays = NULL;
++ int currentState = 0;
++
++ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
++ memset(states, 0, sizeof(states));
++ for (i = 0; i < NB_STATES; i++) {
++ states[i].matrixMode = GL_MODELVIEW;
++ states[i].lastMatrixOp = -1;
++ }
++
++ /* avcodec_init(); AVCodec* avCodec =
++ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
++ * avCodecContext = avcodec_alloc_context(); */
++
++ for (i = 1; i < argc; i++) {
++ if (argv[i][0] == '-' && argv[i][1] == '-')
++ argv[i] = argv[i] + 1;
++
++ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
++ slowdown = atoi(argv[i] + strlen("-slowdown="));
++ } else if (strcmp(argv[i], "-noplay") == 0) {
++ noplay = 1;
++ } else if (strcmp(argv[i], "-debug") == 0) {
++ debug = 1;
++ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
++ disable_real_time_play_back = 1;
++ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
++ show_hard_disk_bandwith = 1;
++ } else if (strcmp(argv[i], "-show-offset") == 0) {
++ show_offset = 1;
++ } else
++ if (strncmp
++ (argv[i], "-show-diff-offset",
++ strlen("-show-diff-offset")) == 0) {
++ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
++ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
++ window_width = atoi(argv[i] + strlen("-width="));
++ resize = 1;
++ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
++ == 0) {
++ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
++ } else
++ if (strncmp
++ (argv[i], "-output-compressed-filename=",
++ strlen("-output-compressed-filename=")) == 0) {
++ char *compressed_filename =
++ argv[i] + strlen("-output-compressed-filename=");
++ compressed_file = fopen(compressed_filename, "wb");
++ } else if (strcmp(argv[i], "-") == 0) {
++ filename = NULL;
++ } else if (strcmp(argv[i], "-h") == 0 ||
++ strcmp(argv[i], "-help") == 0) {
++ usage();
++ return 0;
++ } else
++ filename = argv[i];
++ }
++ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
++
++ if (f == NULL) {
++ fprintf(stderr, "cannot open %s\n", filename);
++ return 0;
++ }
++ // FILE* fout = fopen("/tmp/raw", "wb");
++
++ init_process_tab();
++ ret_string = malloc(32768);
++
++ gettimeofday(&start_time, NULL);
++ gettimeofday(&last_time, NULL);
++
++// void* buffer= NULL;
++#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
++
++ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
++ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
++
++ long long instr_count = 0;
++
++ while (1) {
++ short func_number;
++ short memorize_array_play = -1;
++ short reuse_array_play = -1;
++
++ begin:
++ if (fread(&func_number, sizeof(short), 1, f) == 0)
++ break;
++ if (func_number == _exit_process_func)
++ break;
++
++ if (func_number == _serialized_calls_func) {
++ continue;
++ }
++ // fwrite(&func_number, sizeof(short), 1, fopcodes);
++
++ /*
++ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
++ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
++ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
++ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
++ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
++ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
++ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
++
++ /* -1 is special code that indicates time synchro */
++ if (func_number == timesynchro_func) {
++ long long ts_file;
++ fread(&ts_file, sizeof(long long), 1, f);
++
++ if (compressed_file) {
++ WRITE_SHORT(timesynchro_func);
++ WRITE_LONGLONG(ts_file);
++ }
++
++ if (!disable_real_time_play_back) {
++ gettimeofday(&current_time, NULL);
++ long long ts_real =
++ (current_time.tv_sec -
++ start_time.tv_sec) * (long long) 1000000 +
++ current_time.tv_usec - start_time.tv_usec;
++ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
++ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
++ /* we're playing too fast */
++ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
++ // ts_real));
++ usleep((int) (ts_file - ts_real));
++ }
++ }
++ continue;
++ } else if (func_number == memorize_array_func) {
++ fread(&memorize_array_play, sizeof(short), 1, f);
++ goto begin;
++ } else if (func_number == reuse_array_func) {
++ fread(&reuse_array_play, sizeof(short), 1, f);
++ goto begin;
++ }
++
++ assert(func_number >= 0);
++
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int nb_args = signature->nb_args;
++ int *args_type = signature->args_type;
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++#if 0
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ {
++ char c;
++
++ fread(&c, sizeof(c), 1, f);
++ args[i] = c;
++ break;
++ }
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ {
++ short s;
++
++ fread(&s, sizeof(s), 1, f);
++ args[i] = s;
++ break;
++ }
++
++ case TYPE_FLOAT:
++ fread(&args[i], sizeof(int), 1, f);
++ break;
++
++#endif
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++ {
++ int n;
++ fread(&n, sizeof(int), 1, f);
++ args[i] = n;
++ break;
++ }
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ fread(&args_size[i], sizeof(int), 1, f);
++ if (args_size[i]) {
++ args[i] = (long) malloc(args_size[i]);
++ fread((void *) args[i], args_size[i], 1, f);
++ } else {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ }
++ args[i] = 0;
++ }
++ if (reuse_array_play >= 0) {
++ long current_pos = ftell(f);
++
++ args_size[i] =
++ replayBufferedArrays[reuse_array_play].size;
++ args[i] = (long) malloc(args_size[i]);
++ fseek(f,
++ replayBufferedArrays[reuse_array_play].file_offset,
++ SEEK_SET);
++ fread((void *) args[i], args_size[i], 1, f);
++ fseek(f, current_pos, SEEK_SET);
++ }
++ if (memorize_array_play >= 0) {
++ assert(memorize_array_play <= sizeBufferedArraysPlay);
++ if (memorize_array_play == sizeBufferedArraysPlay) {
++ sizeBufferedArraysPlay++;
++ replayBufferedArrays =
++ realloc(replayBufferedArrays,
++ sizeBufferedArraysPlay *
++ sizeof(ReplayBufferedArray));
++ replayBufferedArrays[sizeBufferedArraysPlay -
++ 1].file_offset = 0;
++ }
++ replayBufferedArrays[memorize_array_play].file_offset =
++ ftell(f) - args_size[i];
++ replayBufferedArrays[memorize_array_play].size =
++ args_size[i];
++ }
++ break;
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] =
++ compute_arg_length(stderr, func_number, i, args);
++ args[i] =
++ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
++ fread((void *) args[i], args_size[i], 1, f);
++ break;
++ }
++
++ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] =
++ compute_arg_length(stderr, func_number, i, args);
++ args[i] = (long) malloc(args_size[i]);
++ break;
++ }
++
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ {
++ fread(&args_size[i], sizeof(int), 1, f);
++ if (args_size[i]) {
++ args[i] = (long) malloc(args_size[i]);
++ } else {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ }
++ args[i] = 0;
++ }
++ break;
++ }
++
++ CASE_OUT_KNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = tab_args_type_length[args_type[i]];
++ assert(args_size[i]);
++ args[i] = (long) malloc(args_size[i]);
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ args_size[i] = tab_args_type_length[args_type[i]];
++ args[i] = (long) malloc(args_size[i]);
++ fread((void *) args[i], args_size[i], 1, f);
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ do_disconnect_current();
++ return 0;
++ }
++ }
++ if (debug)
++ display_gl_call(stderr, func_number, args, args_size);
++
++ if (debug && reuse_array_play != -1)
++ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
++ if (debug && memorize_array_play != -1)
++ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
++
++ if (compressed_file) {
++ int reuse_array = -1;
++ int memorize_array = -1;
++ void *ptr = NULL;
++ int bytes_size = 0;
++ int do_default = 1;
++
++ switch (func_number) {
++ case glXMakeCurrent_func:
++ {
++ currentState = args[2];
++ assert(currentState >= 0 && currentState < NB_STATES);
++ break;
++ }
++
++ case glMatrixMode_func:
++ {
++ if (states[currentState].matrixMode == args[0]) {
++ do_default = 0;
++ } else {
++ states[currentState].matrixMode = args[0];
++ }
++ break;
++ }
++
++ case glLoadIdentity_func:
++ case glLoadMatrixd_func:
++ case glLoadMatrixf_func:
++ case glMultMatrixd_func:
++ case glMultMatrixf_func:
++ case glOrtho_func:
++ case glFrustum_func:
++ case glRotated_func:
++ case glRotatef_func:
++ case glScaled_func:
++ case glScalef_func:
++ case glTranslated_func:
++ case glTranslatef_func:
++ case glPushMatrix_func:
++ case glPopMatrix_func:
++ {
++ if (states[currentState].matrixMode == 5890) {
++ if (states[currentState].lastMatrixOp ==
++ glLoadIdentity_func &&
++ func_number == glLoadIdentity_func) {
++ do_default = 0;
++ }
++ states[currentState].lastMatrixOp = func_number;
++ }
++ break;
++ }
++
++ case glPushAttrib_func:
++ {
++ if (states[currentState].stackAttribPtr <
++ MAX_SERVER_STATE_STACK_SIZE) {
++ int mask = args[0];
++
++ states[currentState].stackAttrib[states[currentState].
++ stackAttribPtr].
++ mask = mask;
++ if (mask & GL_TRANSFORM_BIT) {
++ states[currentState].
++ stackAttrib[states[currentState].
++ stackAttribPtr].matrixMode =
++ states[currentState].matrixMode;
++ states[currentState].
++ stackAttrib[states[currentState].
++ stackAttribPtr].lastMatrixOp =
++ states[currentState].lastMatrixOp;
++ }
++ states[currentState].stackAttribPtr++;
++ }
++ break;
++ }
++
++ case glPopAttrib_func:
++ {
++ if (states[currentState].stackAttribPtr > 0) {
++ --states[currentState].stackAttribPtr;
++ if (states[currentState].
++ stackAttrib[states[currentState].stackAttribPtr].
++ mask & GL_TRANSFORM_BIT) {
++ states[currentState].matrixMode =
++ states[currentState].
++ stackAttrib[states[currentState].
++ stackAttribPtr].matrixMode;
++ states[currentState].lastMatrixOp =
++ states[currentState].
++ stackAttrib[states[currentState].
++ stackAttribPtr].lastMatrixOp;
++ }
++ }
++ break;
++ }
++
++ case glBufferDataARB_func:
++ {
++ ptr = (void *) args[2];
++ bytes_size = args_size[2];
++ break;
++ }
++
++ case glVertexPointer_fake_func:
++ case glTexCoordPointer_fake_func:
++ case glTexCoordPointer01_fake_func:
++ case glDrawElements_func:
++ {
++ ptr = (void *) args[nb_args - 1];
++ bytes_size = args_size[nb_args - 1];
++ break;
++ }
++
++ default:
++ break;
++ }
++
++ if (ptr) {
++ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
++ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
++ int iMinUsed = -1;
++
++ instr_count++;
++
++ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
++ if (recordBufferedArrays[i].crc == crc) {
++ // fprintf(stderr, "reusing %d for crc %d\n", i,
++ // crc);
++ reuse_array = i;
++ // fprintf(stderr, "reuse_array %d\n", i);
++ recordBufferedArrays[i].n_used++;
++ recordBufferedArrays[i].last_use = instr_count;
++ break;
++ } else if (recordBufferedArrays[i].n_used == 0) {
++ // fprintf(stderr, "memorize_array %d\n", i);
++ memorize_array = i;
++ recordBufferedArrays[i].n_used = 1;
++ recordBufferedArrays[i].crc = crc;
++ recordBufferedArrays[i].size = bytes_size;
++ recordBufferedArrays[i].last_use = instr_count;
++ break;
++ } else {
++ long long interest =
++ N_BUFFERED_ARRAYS *
++ recordBufferedArrays[i].n_used / (instr_count -
++ recordBufferedArrays
++ [i].
++ last_use)
++ /** recordBufferedArrays[i].size*/ ;
++ if (interest < minInterest) {
++ iMinUsed = i;
++ minInterest = interest;
++ }
++ }
++ }
++ static unsigned int *discardedCrcs = NULL;
++ static int nDiscardedCrcs = 0;
++
++ if (i == N_BUFFERED_ARRAYS) {
++ int j;
++
++ for (j = 0; j < nDiscardedCrcs; j++) {
++ if (discardedCrcs[j] == crc) {
++ fprintf(stderr,
++ "%x was discarded before and is asked now...\n",
++ crc);
++ discardedCrcs[j] =
++ recordBufferedArrays[iMinUsed].crc;
++ break;
++ }
++ }
++ if (j == nDiscardedCrcs) {
++ discardedCrcs =
++ realloc(discardedCrcs,
++ sizeof(int) * (nDiscardedCrcs + 1));
++ discardedCrcs[nDiscardedCrcs++] =
++ recordBufferedArrays[iMinUsed].crc;
++ }
++ fprintf(stderr, "discarding %x\n",
++ recordBufferedArrays[iMinUsed].crc);
++
++ memorize_array = iMinUsed;
++ recordBufferedArrays[iMinUsed].n_used = 1;
++ recordBufferedArrays[iMinUsed].crc = crc;
++ recordBufferedArrays[iMinUsed].size = bytes_size;
++ recordBufferedArrays[iMinUsed].last_use = instr_count;
++ }
++
++ if (reuse_array != -1) {
++ WRITE_SHORT(reuse_array_func);
++ WRITE_SHORT(reuse_array);
++ } else if (memorize_array != -1) {
++ WRITE_SHORT(memorize_array_func);
++ WRITE_SHORT(memorize_array);
++ }
++ }
++
++ switch (func_number) {
++ case glXChooseVisual_func:
++ case glXQueryVersion_func:
++ case glXQueryExtension_func:
++ case glXGetClientString_func:
++ case glXQueryExtensionsString_func:
++ case glXQueryServerString_func:
++ case glXGetProcAddress_fake_func:
++ case glXGetProcAddress_global_fake_func:
++ case glXGetConfig_func:
++ case glXGetConfig_extended_func:
++ case glGetIntegerv_func:
++ case glGetFloatv_func:
++ case glGetBooleanv_func:
++ case glGetDoublev_func:
++ case glIsEnabled_func:
++ case _glGetError_fake_func:
++ case glGetString_func:
++ {
++ do_default = 0;
++ break;
++ }
++
++ case glLoadMatrixd_func:
++ {
++ int j;
++
++ WRITE_SHORT(glLoadMatrixf_func);
++ double *ptr = (double *) args[0];
++
++ for (j = 0; j < 16; j++) {
++ WRITE_FLOAT(ptr[j]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glMultMatrixd_func:
++ {
++ int j;
++
++ WRITE_SHORT(glMultMatrixf_func);
++ double *ptr = (double *) args[0];
++
++ for (j = 0; j < 16; j++) {
++ WRITE_FLOAT(ptr[j]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glTranslated_func:
++ {
++ WRITE_SHORT(glTranslatef_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glScalef_func:
++ {
++ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
++ && *(float *) &args[2] == 1)
++ do_default = 0;
++ break;
++ }
++
++ case glScaled_func:
++ {
++ if (!
++ (*(double *) args[0] == 1 && *(double *) args[1] == 1
++ && *(double *) args[2] == 1)) {
++ WRITE_SHORT(glScalef_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glRotated_func:
++ {
++ WRITE_SHORT(glRotatef_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ WRITE_FLOAT(*(double *) args[3]);
++ do_default = 0;
++ break;
++ }
++#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
++
++ case glRasterPos2i_func:
++ {
++ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
++ WRITE_SHORT(glRasterPos2s_func);
++ WRITE_SHORT(args[0]);
++ WRITE_SHORT(args[1]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glVertex2i_func:
++ {
++ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
++ WRITE_SHORT(glVertex2s_func);
++ WRITE_SHORT(args[0]);
++ WRITE_SHORT(args[1]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glTexCoord2i_func:
++ {
++ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
++ WRITE_SHORT(glTexCoord2s_func);
++ WRITE_SHORT(args[0]);
++ WRITE_SHORT(args[1]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glTexCoord2fv_func:
++ {
++ float *ptr = (float *) args[0];
++ float u = ptr[0];
++ float v = ptr[1];
++
++ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
++ int ui = (int) u;
++ int vi = (int) v;
++
++ if (IS_SHORT(ui) && IS_SHORT(vi)) {
++ WRITE_SHORT(glTexCoord2s_func);
++ WRITE_SHORT(ui);
++ WRITE_SHORT(vi);
++ do_default = 0;
++ }
++ }
++ break;
++ }
++
++ case glTexCoord2f_func:
++ {
++ float u = *(float *) &args[0];
++ float v = *(float *) &args[1];
++
++ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
++ int ui = (int) u;
++ int vi = (int) v;
++
++ if (IS_SHORT(ui) && IS_SHORT(vi)) {
++ WRITE_SHORT(glTexCoord2s_func);
++ WRITE_SHORT(ui);
++ WRITE_SHORT(vi);
++ do_default = 0;
++ }
++ }
++ break;
++ }
++
++ case glColor3f_func:
++ {
++ WRITE_SHORT(glColor3ub_func);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glColor4f_func:
++ {
++ if (*(float *) &args[3] == 1) {
++ WRITE_SHORT(glColor3ub_func);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
++ } else {
++ WRITE_SHORT(glColor4ub_func);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glColor4fv_func:
++ {
++ float *ptr = (float *) args[0];
++
++ if (ptr[3] == 1) {
++ WRITE_SHORT(glColor3ub_func);
++ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
++ } else {
++ WRITE_SHORT(glColor4ub_func);
++ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glColor3d_func:
++ {
++ WRITE_SHORT(glColor3ub_func);
++ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
++ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
++ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glVertex3f_func:
++ {
++ if (*(float *) &args[2] == 0) {
++ WRITE_SHORT(glVertex2f_func);
++ WRITE_FLOAT(*(float *) &args[0]);
++ WRITE_FLOAT(*(float *) &args[1]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glVertex3d_func:
++ {
++ WRITE_SHORT(glVertex3f_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glNormal3fv_func:
++ {
++ float *ptr = (float *) args[0];
++ float u = ptr[0];
++ float v = ptr[1];
++ float w = ptr[2];
++
++ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
++ && fabs(w - (int) w) < 1e-7) {
++ int ui = (int) u;
++ int vi = (int) v;
++ int wi = (int) w;
++
++ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
++ WRITE_SHORT(glNormal3sv_func);
++ WRITE_SHORT(ui);
++ WRITE_SHORT(vi);
++ WRITE_SHORT(wi);
++ do_default = 0;
++ }
++ }
++ break;
++ }
++
++ case glNormal3d_func:
++ {
++ WRITE_SHORT(glNormal3f_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glDrawElements_func:
++ {
++ int mode = args[0];
++ int count = args[1];
++ int type = args[2];
++
++ if (type == GL_UNSIGNED_INT) {
++ int j;
++ unsigned int *ptr = (unsigned int *) args[3];
++
++ for (j = 0; j < count; j++) {
++ if ((ptr[j] >> 16) != 0)
++ break;
++ }
++ if (j == count) {
++ WRITE_SHORT(func_number);
++ WRITE_INT(mode);
++ WRITE_INT(count);
++ WRITE_INT(GL_UNSIGNED_SHORT);
++ if (reuse_array != -1) {
++ WRITE_INT(0);
++ } else {
++ WRITE_INT(count * sizeof(short));
++ for (j = 0; j < count; j++) {
++ WRITE_SHORT(ptr[j]);
++ }
++ }
++ do_default = 0;
++ } else
++ do_default = 1;
++ } else if (reuse_array != -1) {
++ WRITE_SHORT(func_number);
++ WRITE_INT(mode);
++ WRITE_INT(count);
++ WRITE_INT(type);
++ WRITE_INT(0);
++ do_default = 0;
++ } else
++ do_default = 1;
++ break;
++ }
++
++ case glBufferDataARB_func:
++ {
++ if (reuse_array != -1) {
++ WRITE_SHORT(glBufferDataARB_func);
++ WRITE_INT(args[0]);
++ WRITE_INT(args[1]);
++ WRITE_INT(0);
++ WRITE_INT(args[3]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glVertexPointer_fake_func:
++ case glTexCoordPointer_fake_func:
++ case glTexCoordPointer01_fake_func:
++ {
++ int offset = 0, index = 0, size, type, stride, bytes_size;
++ void *ptr;
++ int countarg = 0;
++
++ if (func_number == glVertexPointer_fake_func ||
++ func_number == glTexCoordPointer_fake_func)
++ offset = args[countarg++];
++ if (func_number == glTexCoordPointer_fake_func)
++ index = args[countarg++];
++ size = args[countarg++];
++ type = args[countarg++];
++ stride = args[countarg++];
++ bytes_size = args[countarg++];
++ ptr = (void *) args[countarg++];
++ if (type == GL_DOUBLE) {
++ int count;
++ int j, k;
++
++ if (stride == 0)
++ stride = size * sizeof(double);
++ assert((bytes_size % stride) == 0);
++ assert((offset % stride) == 0);
++ offset = (offset / stride) * size * sizeof(float);
++ count = bytes_size / stride;
++ WRITE_SHORT(func_number);
++ if (func_number == glVertexPointer_fake_func ||
++ func_number == glTexCoordPointer_fake_func)
++ WRITE_INT(offset);
++ if (func_number == glTexCoordPointer_fake_func)
++ WRITE_INT(index);
++ WRITE_INT(size);
++ WRITE_INT(GL_FLOAT);
++ WRITE_INT(0);
++ WRITE_INT(count * size * sizeof(float));
++ if (reuse_array != -1) {
++ WRITE_INT(0);
++ } else {
++ WRITE_INT(count * size * sizeof(float));
++ for (j = 0; j < count; j++) {
++ for (k = 0; k < size; k++) {
++ WRITE_FLOAT(*(double *)
++ (ptr + j * stride +
++ k * sizeof(double)));
++ }
++ }
++ }
++ do_default = 0;
++ } else if (reuse_array != -1) {
++ WRITE_SHORT(func_number);
++ if (func_number == glVertexPointer_fake_func ||
++ func_number == glTexCoordPointer_fake_func)
++ WRITE_INT(offset);
++ if (func_number == glTexCoordPointer_fake_func)
++ WRITE_INT(index);
++ WRITE_INT(size);
++ WRITE_INT(type);
++ WRITE_INT(stride);
++ WRITE_INT(bytes_size);
++ WRITE_INT(0);
++ do_default = 0;
++ } else
++ do_default = 1;
++ break;
++ }
++
++ default:
++ break;
++ }
++
++ if (do_default) {
++ fwrite(&func_number, sizeof(short), 1, compressed_file);
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ {
++ char c = args[i];
++
++ fwrite(&c, sizeof(c), 1, compressed_file);
++ break;
++ }
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ {
++ short s = args[i];
++
++ fwrite(&s, sizeof(s), 1, compressed_file);
++ break;
++ }
++
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_FLOAT:{
++ int n = args[i];
++ fwrite(&n, sizeof(int), 1, compressed_file);
++ break;
++ }
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ fwrite(&args_size[i], sizeof(int), 1,
++ compressed_file);
++ if (args_size[i]) {
++ fwrite((void *) args[i], args_size[i], 1,
++ compressed_file);
++ }
++ break;
++
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ {
++ fwrite(&args_size[i], sizeof(int), 1,
++ compressed_file);
++ break;
++ }
++
++ CASE_OUT_KNOWN_SIZE_POINTERS:
++ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ fwrite((void *) args[i], args_size[i], 1,
++ compressed_file);
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ do_disconnect_current();
++ return 0;
++ }
++ }
++ }
++ }
++
++ int new_offset = ftell(f);
++
++ if (show_offset ||
++ (show_diff_offset &&
++ new_offset - last_cmd_offset >= show_diff_offset)) {
++ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
++ new_offset - last_cmd_offset);
++ }
++ last_cmd_offset = new_offset;
++
++ if (func_number == glXCreateContext_func &&
++ args[1] == visualid_fbconfig_read) {
++ args[1] = visualid_fbconfig_real;
++ }
++ if (debug) {
++ if (func_number == glBindProgramARB_func) {
++ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
++ (int) args[1]);
++ } else if (func_number == glXGetProcAddress_fake_func) {
++ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
++ (char *) args[0]);
++ }
++ }
++
++ if (debug && func_number == glEnable_func) {
++ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
++ } else if (debug && func_number == glDisable_func) {
++ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
++ }
++
++ if (resize) {
++ if (func_number == _moveResizeWindow_func) {
++ int *params = (int *) args[1];
++
++ orig_window_width = params[2];
++ window_height = params[3] =
++ params[3] * window_width / params[2];
++ params[2] = window_width;
++ // buffer = malloc(4 * window_width * window_height);
++ } else if (func_number == glViewport_func ||
++ func_number == glScissor_func) {
++ args[0] = args[0] * window_width / orig_window_width;
++ args[1] = args[1] * window_width / orig_window_width;
++ args[2] = args[2] * window_width / orig_window_width;
++ args[3] = args[3] * window_width / orig_window_width;
++ }
++ } else if (func_number == _moveResizeWindow_func) {
++ int *params = (int *) args[1];
++
++ window_width = params[2];
++ window_height = params[3];
++ // buffer = malloc(4 * window_width * window_height);
++ }
++
++ int ret =
++ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
++
++ if (func_number == glXSwapBuffers_func) {
++ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
++ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
++ * window_height, 1, fout); */
++
++ int diff_time;
++
++ count_current++;
++ gettimeofday(&current_time, NULL);
++ diff_time =
++ (current_time.tv_sec - last_time.tv_sec) * 1000 +
++ (current_time.tv_usec - last_time.tv_usec) / 1000;
++ if (diff_time > refresh_rate) {
++ printf("%d frames in %.1f seconds = %.3f FPS\n",
++ count_current - count_last_time, diff_time / 1000.,
++ (count_current - count_last_time) * 1000. / diff_time);
++ if (show_hard_disk_bandwith) {
++ int current_offset = ftell(f);
++
++ printf("bandwidth : %.1f MB/s\n",
++ (current_offset - last_offset) * 1e-6);
++ last_offset = current_offset;
++ }
++ last_time.tv_sec = current_time.tv_sec;
++ last_time.tv_usec = current_time.tv_usec;
++ count_last_time = count_current;
++ }
++ usleep(slowdown * 50000);
++ }
++ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
++ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
++ *(int *) args[1]);
++ }
++
++ if (func_number == glXGetVisualFromFBConfig_func) {
++ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
++ visualid_fbconfig_real = ret;
++ }
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++ break;
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_POINTERS:
++ case TYPE_DOUBLE:
++ if (args[i])
++ free((void *) args[i]);
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ do_disconnect_current();
++ return 0;
++ }
++ }
++ }
++ return 0;
++}
+Index: trunk/target-i386/opengl_server.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/opengl_server.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,826 @@
++/*
++ * TCP/IP OpenGL server
++ *
++ * Copyright (c) 2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
++
++#include <stdio.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#include <assert.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <netinet/tcp.h>
++#include <netdb.h>
++#include <arpa/inet.h>
++#include <sys/time.h>
++#include <signal.h>
++
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++#define PORT 5555
++
++#define ENABLE_GL_LOG
++
++#include "opengl_func.h"
++#include "opengl_utils.h"
++
++static int refresh_rate = 1000;
++static int must_save = 0;
++static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
++
++extern int display_function_call;
++extern void init_process_tab(void);
++extern int do_function_call(Display *, int, int, arg_t *, char *);
++extern void opengl_exec_set_local_connection(void);
++extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
++
++#ifdef ENABLE_GL_LOG
++static FILE* f = NULL;
++
++static char* filename = "/tmp/debug_gl.bin";
++
++#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
++
++static void inline write_gl_debug_cmd_char(char my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(my_int), 1, f);
++}
++
++static void inline write_gl_debug_cmd_short(short my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(my_int), 1, f);
++}
++
++static void inline write_gl_debug_cmd_int(int my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(my_int), 1, f);
++}
++
++static void inline write_gl_debug_cmd_longlong(long long my_longlong)
++{
++ write_gl_debug_init();
++ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
++}
++
++static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
++{
++ write_gl_debug_init();
++ fwrite(&size, sizeof(int), 1, f);
++ if (size)
++ fwrite(buffer, size, 1, f);
++}
++
++static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
++{
++ write_gl_debug_init();
++ if (size)
++ fwrite(buffer, size, 1, f);
++}
++
++static void inline write_gl_debug_end()
++{
++ write_gl_debug_init();
++ fclose(f);
++ f = NULL;
++}
++
++#endif
++
++static void write_sock_data(int sock, void* data, int len)
++{
++ if (len && data)
++ {
++ int offset = 0;
++ while(offset < len)
++ {
++ int nwritten = write(sock, data + offset, len - offset);
++ if (nwritten == -1)
++ {
++ if (errno == EINTR)
++ continue;
++ perror("write");
++ assert(nwritten != -1);
++ }
++ offset += nwritten;
++ }
++ }
++}
++
++static void inline write_sock_int(int sock, int my_int)
++{
++ write_sock_data(sock, &my_int, sizeof(int));
++}
++
++static int total_read = 0;
++static void read_sock_data(int sock, void* data, int len)
++{
++ if (len)
++ {
++ int offset = 0;
++ while(offset < len)
++ {
++ int nread = read(sock, data + offset, len - offset);
++ if (nread == -1)
++ {
++ if (errno == EINTR)
++ continue;
++ perror("read");
++ assert(nread != -1);
++ }
++ if (nread == 0)
++ {
++ fprintf(stderr, "nread = 0\n");
++ }
++ assert(nread > 0);
++ offset += nread;
++ total_read += nread;
++ }
++ }
++}
++
++static int inline read_sock_int(int sock)
++{
++ int ret;
++ read_sock_data(sock, &ret, sizeof(int));
++ return ret;
++}
++
++static short inline read_sock_short(int sock)
++{
++ short ret;
++ read_sock_data(sock, &ret, sizeof(short));
++ return ret;
++}
++
++
++static Display* dpy = NULL;
++static int parent_xid = -1;
++
++
++static struct timeval last_time, current_time, time_stamp_start;
++static int count_last_time = 0, count_current = 0;
++
++static struct timeval last_read_time, current_read_time;
++
++int has_x_error = 0;
++
++int
++read_from_client (int sock)
++{
++ arg_t args[50];
++ int args_size[50];
++ char ret_string[32768];
++ char command_buffer[65536*16];
++
++ if (dpy == NULL)
++ {
++ init_process_tab();
++ dpy = XOpenDisplay(NULL);
++ if (parent_xid != -1)
++ {
++ opengl_exec_set_parent_window(dpy, parent_xid);
++ }
++ }
++
++ int i;
++ int func_number = read_sock_short(sock);
++
++ Signature* signature = (Signature*)tab_opengl_calls[func_number];
++ int ret_type = signature->ret_type;
++ int nb_args = signature->nb_args;
++ int* args_type = signature->args_type;
++ int pid = 0;
++
++ if (func_number == _serialized_calls_func)
++ {
++ int command_buffer_size = read_sock_int(sock);
++ int commmand_buffer_offset = 0;
++ read_sock_data(sock, command_buffer, command_buffer_size);
++ /* TODO: must convert if client is different word size */
++
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
++#endif
++
++ while(commmand_buffer_offset < command_buffer_size)
++ {
++ func_number = *(short*)(command_buffer + commmand_buffer_offset);
++ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
++ {
++ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
++ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
++ commmand_buffer_offset, command_buffer_size);
++ exit(-1);
++ }
++
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_short(func_number);
++#endif
++ commmand_buffer_offset += sizeof(short);
++
++
++ signature = (Signature*)tab_opengl_calls[func_number];
++ ret_type = signature->ret_type;
++ assert(ret_type == TYPE_NONE);
++ nb_args = signature->nb_args;
++ args_type = signature->args_type;
++
++ for(i=0;i<nb_args;i++)
++ {
++ switch(args_type[i])
++ {
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ {
++ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_char(args[i]);
++#endif
++ commmand_buffer_offset += sizeof(int);
++ break;
++ }
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ {
++ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_short(args[i]);
++#endif
++ commmand_buffer_offset += sizeof(int);
++ break;
++ }
++
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_FLOAT:
++ {
++ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_int(args[i]);
++#endif
++ commmand_buffer_offset += sizeof(int);
++ break;
++ }
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
++ commmand_buffer_offset += sizeof(int);
++
++ if (args_size[i] == 0)
++ {
++ args[i] = 0;
++ }
++ else
++ {
++ args[i] = (long)(command_buffer + commmand_buffer_offset);
++ }
++
++ if (args[i] == 0)
++ {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
++ {
++ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
++ return 0;
++ }
++ }
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
++#endif
++ commmand_buffer_offset += args_size[i];
++
++ break;
++ }
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] = compute_arg_length(stderr, func_number, i, args);
++ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
++#endif
++ commmand_buffer_offset += args_size[i];
++ break;
++ }
++
++ CASE_OUT_POINTERS:
++ {
++ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
++ return 0;
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ args[i] = (long)(command_buffer + commmand_buffer_offset);
++ args_size[i] = tab_args_type_length[args_type[i]];
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
++#endif
++ commmand_buffer_offset += tab_args_type_length[args_type[i]];
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
++ return 0;
++ break;
++ }
++ }
++
++ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
++
++ do_function_call(dpy, func_number, 1, args, ret_string);
++ }
++ }
++ else
++ {
++#ifdef ENABLE_GL_LOG
++ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
++#endif
++
++ for(i=0;i<nb_args;i++)
++ {
++ switch(args_type[i])
++ {
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ args[i] = read_sock_int(sock);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_char(args[i]);
++#endif
++ break;
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ args[i] = read_sock_int(sock);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_short(args[i]);
++#endif
++ break;
++
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_FLOAT:
++ args[i] = read_sock_int(sock);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_int(args[i]);
++#endif
++ break;
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = read_sock_int(sock);
++ if (args_size[i])
++ {
++ args[i] = (long)malloc(args_size[i]);
++ read_sock_data(sock, (void*)args[i], args_size[i]);
++ }
++ else
++ {
++ args[i] = 0;
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
++ {
++ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
++ return 0;
++ }
++ }
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
++#endif
++ break;
++ }
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] = compute_arg_length(stderr, func_number, i, args);
++ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
++ read_sock_data(sock, (void*)args[i], args_size[i]);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
++#endif
++ break;
++ }
++
++ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] = compute_arg_length(stderr, func_number, i, args);
++ args[i] = (long)malloc(args_size[i]);
++ break;
++ }
++
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = read_sock_int(sock);
++ if (func_number == glGetProgramLocalParameterdvARB_func)
++ {
++ fprintf(stderr, "size = %d\n", args_size[i]);
++ }
++ if (args_size[i])
++ {
++ args[i] = (long)malloc(args_size[i]);
++ }
++ else
++ {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
++ {
++ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
++ return 0;
++ };
++ args[i] = 0;
++ }
++ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_int(args_size[i]);
++#endif
++ break;
++ }
++
++ CASE_OUT_KNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = tab_args_type_length[args_type[i]];
++ assert(args_size[i]);
++ args[i] = (long)malloc(args_size[i]);
++ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ args_size[i] = tab_args_type_length[args_type[i]];
++ args[i] = (long)malloc(args_size[i]);
++ read_sock_data(sock, (void*)args[i], args_size[i]);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
++#endif
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
++ return 0;
++ break;
++ }
++ }
++
++ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
++
++ if (getenv("ALWAYS_FLUSH")) fflush(f);
++
++ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
++#ifdef ENABLE_GL_LOG
++ if (must_save && func_number == glXGetVisualFromFBConfig_func)
++ {
++ write_gl_debug_cmd_int(ret);
++ }
++#endif
++
++ for(i=0;i<nb_args;i++)
++ {
++ switch(args_type[i])
++ {
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++ break;
++
++ case TYPE_NULL_TERMINATED_STRING:
++ case TYPE_DOUBLE:
++ CASE_IN_POINTERS:
++ if (args[i]) free((void*)args[i]);
++ break;
++
++ CASE_OUT_POINTERS:
++ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
++ write_sock_data(sock, (void*)args[i], args_size[i]);
++ if (display_function_call)
++ {
++ if (args_type[i] == TYPE_OUT_1INT)
++ {
++ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
++ }
++ else if (args_type[i] == TYPE_OUT_1FLOAT)
++ {
++ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
++ }
++ }
++ if (args[i]) free((void*)args[i]);
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
++ return 0;
++ break;
++ }
++ }
++
++ if (signature->ret_type == TYPE_CONST_CHAR)
++ {
++ write_sock_int(sock, strlen(ret_string) + 1);
++ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
++ }
++ else if (signature->ret_type != TYPE_NONE)
++ {
++ write_sock_int(sock, ret);
++ }
++
++#ifdef ENABLE_GL_LOG
++ if (must_save && func_number == _exit_process_func)
++ {
++ write_gl_debug_end();
++ }
++#endif
++ if (func_number == _exit_process_func)
++ {
++ return -1;
++ }
++ else if (func_number == glXSwapBuffers_func)
++ {
++ int diff_time;
++ count_current++;
++ gettimeofday(&current_time, NULL);
++#ifdef ENABLE_GL_LOG
++ if (must_save && timestamp)
++ {
++ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
++ /* -1 is special code that indicates time synchro */
++ write_gl_debug_cmd_short(timesynchro_func);
++ write_gl_debug_cmd_longlong(ts);
++ }
++#endif
++ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
++ if (diff_time > refresh_rate)
++ {
++#ifdef ENABLE_GL_LOG
++ fflush(f);
++#endif
++ printf("%d frames in %.1f seconds = %.3f FPS\n",
++ count_current - count_last_time,
++ diff_time / 1000.,
++ (count_current - count_last_time) * 1000. / diff_time);
++ last_time.tv_sec = current_time.tv_sec;
++ last_time.tv_usec = current_time.tv_usec;
++ count_last_time = count_current;
++ }
++ }
++ }
++ return 0;
++}
++
++int
++make_socket (uint16_t port)
++{
++ int sock;
++ struct sockaddr_in name;
++
++ /* Create the socket. */
++ sock = socket (PF_INET, SOCK_STREAM, 0);
++ if (sock < 0)
++ {
++ perror ("socket");
++ exit (EXIT_FAILURE);
++ }
++
++ /* Give the socket a name. */
++ name.sin_family = AF_INET;
++ name.sin_port = htons (port);
++ name.sin_addr.s_addr = htonl (INADDR_ANY);
++ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
++ {
++ perror ("bind");
++ exit (EXIT_FAILURE);
++ }
++
++ return sock;
++}
++
++static int x_error_handler(Display *display,
++ XErrorEvent *error)
++{
++ char buf[64];
++ XGetErrorText(display, error->error_code, buf, 63);
++ fprintf (stderr, "The program received an X Window System error.\n"
++ "This probably reflects a bug in the program.\n"
++ "The error was '%s'.\n"
++ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
++ buf,
++ error->serial,
++ error->error_code,
++ error->request_code,
++ error->minor_code);
++ has_x_error = 1;
++ return 0;
++}
++
++void usage()
++{
++ printf("Usage : opengl_server [OPTION]\n\n");
++ printf("The following options are available :\n");
++ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
++ printf("--debug : output debugging trace on stderr\n");
++ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
++ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
++ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
++ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
++ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
++ printf(" or from another emulator, through TCP/IP\n");
++ printf("--h or --help : display this help\n");
++}
++
++int
++main (int argc, char* argv[])
++{
++ int sock;
++ fd_set active_fd_set, read_fd_set;
++ int i;
++ struct sockaddr_in clientname;
++ socklen_t size;
++ int port = PORT;
++ int different_windows = 0;
++
++ for(i=1;i<argc;i++)
++ {
++ if (argv[i][0] == '-' && argv[i][1] == '-')
++ argv[i] = argv[i]+1;
++
++ if (strcmp(argv[i], "-debug") == 0)
++ {
++ display_function_call = 1;
++ }
++ else if (strcmp(argv[i], "-save") == 0)
++ {
++ must_save = 1;
++ }
++ else if (strncmp(argv[i], "-port=",6) == 0)
++ {
++ port = atoi(argv[i] + 6);
++ }
++ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
++ {
++ filename = argv[i] + strlen("-filename=");
++ }
++ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
++ {
++ char* c = argv[i] + strlen("-parent-xid=");
++ parent_xid = strtol(c, NULL, 0);
++ different_windows = 1;
++ }
++ else if (strcmp(argv[i], "-different-windows") == 0)
++ {
++ different_windows = 1;
++ }
++ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
++ {
++ usage();
++ return 0;
++ }
++ else
++ {
++ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
++ usage();
++ return -1;
++ }
++ }
++
++ /* Create the socket and set it up to accept connections. */
++ sock = make_socket (port);
++
++ int flag = 1;
++ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
++ {
++ perror("setsockopt SO_REUSEADDR");
++ }
++ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
++ {
++ perror("setsockopt TCP_NODELAY");
++ }
++
++ if (listen (sock, 1) < 0)
++ {
++ perror ("listen");
++ exit (EXIT_FAILURE);
++ }
++
++ struct sigaction action;
++ action.sa_handler = SIG_IGN;
++ action.sa_flags = SA_NOCLDWAIT;
++ sigaction(SIGCHLD,&action,NULL);
++
++ FD_ZERO (&active_fd_set);
++ FD_SET (sock, &active_fd_set);
++
++ while(1)
++ {
++ int new, pid;
++
++ read_fd_set = active_fd_set;
++ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
++ {
++ perror ("select");
++ exit (EXIT_FAILURE);
++ }
++
++ size = sizeof (clientname);
++ new = accept (sock, (struct sockaddr *) &clientname, &size);
++ if (new < 0)
++ {
++ perror ("accept");
++ exit (EXIT_FAILURE);
++ }
++ pid = fork();
++ if (pid == -1)
++ {
++ perror ("fork");
++ exit(EXIT_FAILURE);
++ }
++ if (pid == 0)
++ {
++ close(sock);
++
++ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
++ inet_ntoa (clientname.sin_addr),
++ ntohs (clientname.sin_port));
++
++ gettimeofday(&last_time, NULL);
++ gettimeofday(&last_read_time, NULL);
++
++ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
++ different_windows == 0)
++ {
++ opengl_exec_set_local_connection();
++ }
++
++ if (timestamp)
++ {
++ gettimeofday(&time_stamp_start, NULL);
++ }
++
++ XSetErrorHandler(x_error_handler);
++
++ while(1)
++ {
++ if (read_from_client (new) < 0)
++ {
++ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
++
++ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
++ inet_ntoa (clientname.sin_addr),
++ ntohs (clientname.sin_port));
++
++ return 0;
++ }
++ }
++ }
++ else
++ {
++ close(new);
++ }
++ }
++
++ return 0;
++}
+Index: trunk/target-i386/opengl_utils.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/opengl_utils.h 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,453 @@
++/*
++ * Functions used by host & client sides
++ *
++ * Copyright (c) 2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++
++#ifndef _OPENGL_UTILS
++#define _OPENGL_UTILS
++
++typedef struct {
++ unsigned int *values;
++ int nbValues;
++} RangeAllocator;
++
++/*
++static void print_range(RangeAllocator* range)
++{
++ int i;
++ printf("%s", "table : ");
++ for(i=0;i<range->nbValues;i++)
++ {
++ printf("%d ", range->values[i]);
++ }
++ printf("\n");
++}
++*/
++
++static inline void alloc_value(RangeAllocator *range, unsigned int value)
++{
++ if (value == 0)
++ return;
++ if (range->nbValues >= 1) {
++ int lower = 0;
++ int upper = range->nbValues - 1;
++
++ while (1) {
++ int mid = (lower + upper) / 2;
++
++ if (range->values[mid] > value)
++ upper = mid;
++ else if (range->values[mid] < value)
++ lower = mid;
++ else
++ break;
++ if (upper - lower <= 1) {
++ if (value < range->values[lower]) {
++ range->values =
++ realloc(range->values,
++ (range->nbValues + 1) * sizeof(int));
++ memmove(&range->values[lower + 1], &range->values[lower],
++ (range->nbValues - lower) * sizeof(int));
++ range->values[lower] = value;
++ range->nbValues++;
++ } else if (value == range->values[lower]) {
++ } else if (value < range->values[upper]) {
++ range->values =
++ realloc(range->values,
++ (range->nbValues + 1) * sizeof(int));
++ memmove(&range->values[upper + 1], &range->values[upper],
++ (range->nbValues - upper) * sizeof(int));
++ range->values[upper] = value;
++ range->nbValues++;
++ } else if (value == range->values[upper]) {
++ } else {
++ upper++;
++
++ range->values =
++ realloc(range->values,
++ (range->nbValues + 1) * sizeof(int));
++ memmove(&range->values[upper + 1], &range->values[upper],
++ (range->nbValues - upper) * sizeof(int));
++ range->values[upper] = value;
++ range->nbValues++;
++ }
++ break;
++ }
++ }
++ } else {
++ range->values = malloc(sizeof(int));
++ range->values[0] = value;
++ range->nbValues = 1;
++ }
++}
++
++/* return first value */
++static inline unsigned int alloc_range(RangeAllocator *range, int n,
++ unsigned int *values)
++{
++ int i, j;
++
++ if (range->nbValues == 0) {
++ range->nbValues = n;
++ range->values = malloc(n * sizeof(int));
++ for (i = 0; i < n; i++) {
++ range->values[i] = i + 1;
++ if (values)
++ values[i] = range->values[i];
++ }
++ return 1;
++ } else {
++ int lastValue = 1;
++
++ for (i = 0; i < range->nbValues; i++) {
++ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
++ range->values =
++ realloc(range->values,
++ (range->nbValues + n) * sizeof(int));
++ memmove(&range->values[i + n], &range->values[i],
++ (range->nbValues - i) * sizeof(int));
++ for (j = 0; j < n; j++) {
++ range->values[i + j] = lastValue + 1 + j;
++ if (values)
++ values[j] = range->values[i + j];
++ }
++ range->nbValues += n;
++ break;
++ } else
++ lastValue = range->values[i];
++ }
++ if (i == range->nbValues) {
++ range->values =
++ realloc(range->values, (range->nbValues + n) * sizeof(int));
++ for (j = 0; j < n; j++) {
++ range->values[i + j] = lastValue + 1 + j;
++ if (values)
++ values[j] = range->values[i + j];
++ }
++ range->nbValues += n;
++ }
++ return lastValue + 1;
++ }
++}
++
++static inline void delete_value(RangeAllocator *range, unsigned int value)
++{
++ if (value == 0)
++ return;
++ if (range->nbValues >= 1) {
++ int lower = 0;
++ int upper = range->nbValues - 1;
++
++ while (1) {
++ int mid = (lower + upper) / 2;
++
++ if (range->values[mid] > value)
++ upper = mid;
++ else if (range->values[mid] < value)
++ lower = mid;
++ else {
++ lower = upper = mid;
++ }
++ if (upper - lower <= 1) {
++ if (value == range->values[lower]) {
++ memmove(&range->values[lower], &range->values[lower + 1],
++ (range->nbValues - lower - 1) * sizeof(int));
++ range->nbValues--;
++ } else if (value == range->values[upper]) {
++ memmove(&range->values[upper], &range->values[upper + 1],
++ (range->nbValues - upper - 1) * sizeof(int));
++ range->nbValues--;
++ }
++ break;
++ }
++ }
++ }
++}
++
++static inline void delete_range(RangeAllocator *range, int n,
++ const unsigned int *values)
++{
++ int i;
++
++ for (i = 0; i < n; i++) {
++ delete_value(range, values[i]);
++ }
++}
++
++static inline void delete_consecutive_values(RangeAllocator *range,
++ unsigned int first, int n)
++{
++ int i;
++
++ for (i = 0; i < n; i++) {
++ delete_value(range, first + i);
++ }
++}
++
++
++/*****************************************************************/
++/* */
++/* CRC LOOKUP TABLE */
++/* ================ */
++/* The following CRC lookup table was generated automagically */
++/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
++/* Program V1.0 using the following model parameters: */
++/* */
++/* Width : 4 bytes. */
++/* Poly : 0x04C11DB7L */
++/* Reverse : TRUE. */
++/* */
++/* For more information on the Rocksoft^tm Model CRC Algorithm, */
++/* see the document titled "A Painless Guide to CRC Error */
++/* Detection Algorithms" by Ross Williams */
++/* (ross@guest.adelaide.edu.au.). This document is likely to be */
++/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
++/* */
++/*****************************************************************/
++
++static const unsigned int crctable[256] = {
++ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
++ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
++ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
++ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
++ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
++ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
++ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
++ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
++ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
++ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
++ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
++ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
++ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
++ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
++ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
++ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
++ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
++ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
++ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
++ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
++ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
++ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
++ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
++ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
++ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
++ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
++ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
++ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
++ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
++ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
++ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
++ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
++ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
++ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
++ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
++ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
++ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
++ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
++ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
++ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
++ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
++ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
++ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
++ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
++ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
++ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
++ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
++ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
++ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
++ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
++ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
++ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
++ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
++ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
++ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
++ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
++ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
++ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
++ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
++ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
++ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
++ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
++ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
++ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
++};
++
++static unsigned int calc_checksum(const void *_ptr, int length,
++ unsigned int seed)
++{
++ int i;
++ unsigned int crc = seed;
++ unsigned char *ptr = (unsigned char *) _ptr;
++
++ if (ptr == NULL)
++ return -1;
++ for (i = 0; i < length; i++) {
++ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
++ }
++ return crc;
++}
++
++
++static inline void display_gl_call(FILE *f,
++ int func_number, arg_t *args, int *args_size)
++{
++ int i;
++
++ if (func_number < 0) {
++ fprintf(f, "unknown call : %d\n", func_number);
++ return;
++ }
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int nb_args = signature->nb_args;
++ int *args_type = signature->args_type;
++
++ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ {
++ fprintf(f, "%d", (char) args[i]);
++ break;
++ }
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ {
++ fprintf(f, "%d", (short) args[i]);
++ break;
++ }
++
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ {
++ fprintf(f, "%d", (int) args[i]);
++ break;
++ }
++
++ case TYPE_FLOAT:
++ fprintf(f, "%f", *(float *) &args[i]);
++ break;
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
++ fprintf(f, "\"%s\"", (char *) args[i]);
++ } else if (args_type[i] == TYPE_DOUBLE)
++ fprintf(f, "%f", *(double *) args[i]);
++ else if (IS_ARRAY_CHAR(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(char)) {
++ int j;
++ int n = args_size[i] / sizeof(char);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else if (IS_ARRAY_SHORT(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(short)) {
++ int j;
++ int n = args_size[i] / sizeof(short);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%d", ((short *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else if (IS_ARRAY_INT(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(int)) {
++ int j;
++ int n = args_size[i] / sizeof(int);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%d", ((int *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(float)) {
++ int j;
++ int n = args_size[i] / sizeof(float);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%f", ((float *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(double)) {
++ int j;
++ int n = args_size[i] / sizeof(double);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%f", ((double *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else {
++ fprintf(f, "%d bytes", args_size[i]);
++ fprintf(f, "(crc = 0x%x)",
++ calc_checksum((void *) args[i], args_size[i],
++ 0xFFFFFFFF));
++ }
++ break;
++
++ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ CASE_OUT_KNOWN_SIZE_POINTERS:
++ {
++ fprintf(f, "%d bytes (OUT)", args_size[i]);
++ break;
++ }
++
++ case TYPE_IN_IGNORED_POINTER:
++ break;
++
++ default:
++ fprintf(f, "shouldn't happen : call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ return;
++ break;
++ }
++ if (i < nb_args - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")\n");
++}
++
++#endif
+Index: trunk/target-i386/parse_gl_h.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/parse_gl_h.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,1496 @@
++/*
++ * Parse gl.h et glx.h to auto-generate source code
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <assert.h>
++
++int isExtByName(const char* name)
++{
++ return (strstr(name, "ARB") != NULL) ||
++ (strstr(name, "IBM") != NULL) ||
++ (strstr(name, "EXT") != NULL) ||
++ (strstr(name, "ATI") != NULL) ||
++ (strstr(name, "NV") != NULL) ||
++ (strstr(name, "MESA") != NULL) ||
++ (strstr(name, "APPLE") != NULL) ||
++ (strstr(name, "SUN") != NULL) ||
++ (strstr(name, "SGI") != NULL);
++}
++
++char* get_arg_type(char* s)
++{
++ while(*s == ' ' || *s == '\t') s++;
++ char* n = s;
++ char* c = strstr(n, "const");
++ if (c)
++ n += 6;
++
++ char* t = strstr(n, " ");
++ if (t)
++ {
++ if (t[1] == '*')
++ t += 2;
++ t[0] = 0;
++ char* ori = t;
++ t = strstr(t+1, "[");
++ if (t)
++ {
++ memmove(ori, t, strlen(t));
++ strstr(ori, "]")[1] = 0;
++ }
++ }
++ return strdup(s);
++}
++
++typedef struct
++{
++ char* type;
++ char* name;
++ int nargs;
++ char** args;
++ int ok;
++ int just_for_server_side;
++ int has_out_parameters;
++ int isExt;
++} FuncDesc;
++
++int isExt(FuncDesc* func)
++{
++ return func->isExt;
++}
++
++char* get_type_string(char* type)
++{
++ if (strstr(type, "[16]"))
++ {
++ if (strstr(type, "float"))
++ return ("TYPE_16FLOAT");
++ else if (strstr(type, "double"))
++ return ("TYPE_16DOUBLE");
++ else
++ {
++ printf("inconnu %s\n", type);
++ exit(-1);
++ }
++ }
++ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
++ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
++ else if (strstr(type, "const GLvoid *"))
++ return "TYPE_ARRAY_VOID";
++ else if (strstr(type, "const GLchar *") ||
++ strstr(type, "const GLcharARB *"))
++ return "TYPE_NULL_TERMINATED_STRING";
++ else if (strstr(type, "const GLbyte *"))
++ return "TYPE_ARRAY_SIGNED_CHAR";
++ else if (strstr(type, "const GLubyte *"))
++ return "TYPE_ARRAY_UNSIGNED_CHAR";
++ else if (strstr(type, "const GLshort *"))
++ return "TYPE_ARRAY_SHORT";
++ else if (strstr(type, "const GLushort *") ||
++ strstr(type, "const GLhalfNV *"))
++ return "TYPE_ARRAY_UNSIGNED_SHORT";
++ else if (strstr(type, "const GLint *"))
++ return "TYPE_ARRAY_INT";
++ else if (strstr(type, "const GLuint *") ||
++ strstr(type, "const GLenum *"))
++ return "TYPE_ARRAY_UNSIGNED_INT";
++ else if (strstr(type, "const GLfloat *") ||
++ strstr(type, "const GLclampf *"))
++ return "TYPE_ARRAY_FLOAT";
++ else if (strstr(type, "const GLdouble *"))
++ return "TYPE_ARRAY_DOUBLE";
++ else if (strstr(type, "GLvoid *"))
++ return "TYPE_OUT_ARRAY_VOID";
++ else if (strstr(type, "GLboolean *") ||
++ strstr(type, "GLubyte *"))
++ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
++ else if (strstr(type, "GLcharARB *") ||
++ strstr(type, "GLchar *"))
++ return "TYPE_OUT_ARRAY_CHAR";
++ else if (strstr(type, "GLshort *"))
++ return "TYPE_OUT_ARRAY_SHORT";
++ else if (strstr(type, "GLushort *"))
++ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
++ else if (strstr(type, "GLint *")||
++ strstr(type, "GLsizei *"))
++ return "TYPE_OUT_ARRAY_INT";
++ else if (strstr(type, "GLuint *") ||
++ strstr(type, "GLenum *") ||
++ strstr(type, "GLhandleARB *"))
++ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
++ else if (strstr(type, "GLfloat *"))
++ return "TYPE_OUT_ARRAY_FLOAT";
++ else if (strstr(type, "GLdouble *"))
++ return "TYPE_OUT_ARRAY_DOUBLE";
++ else if (strcmp(type, "void") == 0)
++ return("TYPE_NONE");
++ else if (strcmp(type, "GLbyte") == 0)
++ return("TYPE_CHAR");
++ else if (strcmp(type, "GLubyte") == 0 ||
++ strcmp(type, "GLboolean") == 0)
++ return("TYPE_UNSIGNED_CHAR");
++ else if (strcmp(type, "GLshort") == 0)
++ return("TYPE_SHORT");
++ else if (strcmp(type, "GLushort") == 0 ||
++ strcmp(type, "GLhalfNV") == 0)
++ return("TYPE_UNSIGNED_SHORT");
++ else if (strcmp(type, "GLint") == 0 ||
++ strcmp(type, "GLsizei") == 0 ||
++ strcmp(type, "GLintptr") == 0 ||
++ strcmp(type, "GLsizeiptr") == 0 ||
++ strcmp(type, "GLintptrARB") == 0 ||
++ strcmp(type, "GLsizeiptrARB") == 0)
++ return("TYPE_INT");
++ else if (strcmp(type, "GLenum") == 0 ||
++ strcmp(type, "GLuint") == 0 ||
++ strcmp(type, "GLhandleARB") == 0 ||
++ strcmp(type, "GLbitfield") == 0)
++ return("TYPE_UNSIGNED_INT");
++ else if (strcmp(type, "GLfloat") == 0 ||
++ strcmp(type, "GLclampf") == 0)
++ return("TYPE_FLOAT");
++ else if (strcmp(type, "GLdouble") == 0 ||
++ strcmp(type, "GLclampd") == 0)
++ return("TYPE_DOUBLE");
++ else
++ {
++ printf("inconnu %s\n", type);
++ exit(-1);
++ }
++}
++
++typedef struct
++{
++ char* letter;
++ char* signature_type_name;
++ char* gl_c_type_name;
++ char* c_type_name;
++} ForIsKnownArgVector;
++
++#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
++#define N_FIELDS_IN_ARG_VECTOR 4
++
++
++typedef struct
++{
++ char* func_name;
++ char* signature_type_name;
++} KnownLastArgFunc;
++
++static KnownLastArgFunc knownLastArgFuncs[] =
++{
++{"glFogCoordfv", "TYPE_1FLOAT"},
++{"glFogCoorddv", "TYPE_1DOUBLE"},
++{"glFogCoordfvEXT", "TYPE_1FLOAT"},
++{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
++{"glFogCoordhvNV", "TYPE_1USHORT"},
++
++{"glGetFenceivNV", "TYPE_OUT_1INT"},
++
++{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
++{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
++
++{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
++{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
++{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
++{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
++{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
++{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
++{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
++{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
++{"glGetQueryivARB", "TYPE_OUT_1INT"},
++{"glGetQueryiv", "TYPE_OUT_1INT"},
++{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
++{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
++{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
++{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
++{"glGetProgramivARB", "TYPE_OUT_1INT"},
++{"glGetProgramiv", "TYPE_OUT_1INT"},
++{"glGetProgramivNV", "TYPE_OUT_1INT"},
++{"glGetShaderiv", "TYPE_OUT_1INT"},
++
++{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
++{"glCombinerParameterivNV", "TYPE_1INT"},
++
++{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
++{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
++{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
++{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
++
++{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
++{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
++
++{"glTexBumpParameterivATI", "TYPE_1INT"},
++{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
++{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
++{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
++
++{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
++{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
++{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
++{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
++{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
++{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
++{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
++{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
++
++{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
++{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
++{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
++{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
++
++{"glCullParameterfvEXT", "TYPE_4FLOAT"},
++{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
++
++{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
++{"glExecuteProgramNV", "TYPE_4FLOAT"},
++
++{"glEdgeFlagv", "TYPE_1UCHAR"},
++
++{"glClipPlane", "TYPE_4DOUBLE"},
++{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
++
++{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
++
++{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
++{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
++{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
++{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
++{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
++{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
++{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
++{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
++
++{"glPixelTransformParameterivEXT", "TYPE_1INT"},
++{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
++{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
++{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
++
++{"glColorTableParameterfv", "TYPE_4FLOAT"},
++{"glColorTableParameteriv", "TYPE_4INT"},
++{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
++{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
++{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
++{"glColorTableParameterivEXT", "TYPE_4INT"},
++{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
++{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
++
++{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
++{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
++{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
++{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
++{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
++{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
++{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
++{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
++
++/* Not sure at all for the 2 followingo ones ! */
++{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
++{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
++
++{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
++
++{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
++
++};
++
++int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
++{
++ static ForIsKnownArgVector my_tab[] =
++ {
++ { "b", "CHAR", "GLbyte", "signed char" },
++ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
++ { "s", "SHORT", "GLshort", "short" },
++ { "i", "INT", "GLint", "int" },
++ { "Integer", "INT", "GLint", "int" },
++ { "ub", "CHAR", "GLubyte", "unsigned char" },
++ { "h", "SHORT", "GLhalf", "unsigned short" },
++ { "us", "SHORT", "GLushort", "unsigned short" },
++ { "ui", "INT", "GLuint", "unsigned int" },
++ { "Nb", "CHAR", "GLbyte", "signed char" },
++ { "Ns", "SHORT", "GLshort", "short" },
++ { "Ni", "INT", "GLint", "int" },
++ { "Nub", "CHAR", "GLubyte", "unsigned char" },
++ { "Nus", "SHORT", "GLushort", "unsigned short" },
++ { "Nui", "INT", "GLuint", "unsigned int" },
++
++ { "f", "FLOAT", "GLfloat", "float" },
++ { "Float", "FLOAT", "GLfloat", "float" },
++ { "d", "DOUBLE", "GLdouble", "double" },
++ };
++
++ if (desc->nargs == 0)
++ return 0;
++
++ int i , j;
++
++ if (strstr(desc->name, "glVertexAttribs") ||
++ strstr(desc->name, "glProgramParameters") ||
++ strstr(desc->name, "glProgramEnvParameters") ||
++ strstr(desc->name, "glProgramLocalParameters") ||
++ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
++ return 0;
++
++ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
++ char signature[10];
++
++ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
++ {
++ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
++ {
++ if (p_signature_type_name)
++ {
++ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
++ }
++ if (p_c_type_name)
++ {
++ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
++ *p_c_type_name = "float";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
++ *p_c_type_name = "double";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
++ *p_c_type_name = "unsigned int";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
++ *p_c_type_name = "int";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
++ *p_c_type_name = "unsigned short";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
++ *p_c_type_name = "short";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
++ *p_c_type_name = "unsigned char";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
++ *p_c_type_name = "char";
++ else
++ assert(0);
++ }
++ return 1;
++ }
++ }
++
++ for(i=0;i<N_ELEMENTS(my_tab);i++)
++ {
++ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
++ {
++ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
++ sprintf(signature, "%sv", my_tab[i].letter);
++ else
++ sprintf(signature, "%d%sv", j, my_tab[i].letter);
++ if (strstr(desc->name, signature) &&
++ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
++ strstr(desc->args[desc->nargs - 1], "*"))
++ {
++ if (p_signature_type_name)
++ {
++ if (signatures[i][j-1][0] == 0)
++ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
++ *p_signature_type_name = signatures[i][j-1];
++ }
++ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
++ return 1;
++ }
++ }
++ }
++ return 0;
++}
++
++static void print_server_side_argument(FILE* server_stub, int j, char* glType)
++{
++ const char* symbolic_type = get_type_string(glType);
++ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
++ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
++ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
++ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
++ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
++ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
++ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
++ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
++ fprintf(server_stub, "(const float*)(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
++ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
++ fprintf(server_stub, "(const double*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
++ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
++ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
++ fprintf(server_stub, "(const char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
++ fprintf(server_stub, "(const short*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
++ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
++ fprintf(server_stub, "(const int*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
++ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
++ fprintf(server_stub, "(const float*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
++ fprintf(server_stub, "(const double*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
++ fprintf(server_stub, "(const char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
++ fprintf(server_stub, "(const signed char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
++ fprintf(server_stub, "(const void*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
++ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
++ fprintf(server_stub, "(short*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
++ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
++ fprintf(server_stub, "(int*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
++ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
++ fprintf(server_stub, "(float*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
++ fprintf(server_stub, "(double*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
++ fprintf(server_stub, "(void*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
++ fprintf(server_stub, "(char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
++ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
++
++ else
++ {
++ fprintf(stderr, "Unknown : %s\n", symbolic_type);
++ assert(0);
++ }
++}
++
++static const char* func_dealt_by_hand[500] = { NULL };
++
++
++static const char* ignore_func[] =
++{
++ "glGetPointerv",
++ "glRectdv",
++ "glRectfv",
++ "glRectiv",
++ "glRectsv",
++ "glMultiDrawArrays",
++ "glMultiDrawArraysEXT",
++ "glMultiDrawElements",
++ "glMultiDrawElementsEXT",
++ "glUnmapBuffer",
++ "glUnmapBufferARB",
++ "glLoadTransposeMatrixf",
++ "glLoadTransposeMatrixd",
++ "glMultTransposeMatrixf",
++ "glMultTransposeMatrixd",
++ "glLoadTransposeMatrixfARB",
++ "glLoadTransposeMatrixdARB",
++ "glMultTransposeMatrixfARB",
++ "glMultTransposeMatrixdARB",
++
++ "glPixelDataRangeNV",
++ "glFlushPixelDataRangeNV",
++ "glVertexArrayRangeNV",
++ "glFlushVertexArrayRangeNV",
++ "glVertexWeightfEXT",
++
++ "glGetBufferPointerv",
++ "glGetBufferPointervARB",
++ "glGetVertexAttribPointerv",
++ "glGetVertexAttribPointervARB",
++ "glVertexAttribPointer",
++ "glVertexAttribPointerARB",
++ "glGetVariantPointervEXT",
++ NULL,
++};
++
++void get_func_dealt_by_hand()
++{
++ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
++ char buffer[256];
++ int i = 0;
++ char* c;
++ while(fgets(buffer, 256, f))
++ {
++ if (strstr(buffer, "MAGIC_MACRO("))
++ {
++ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
++ * strstr(func_dealt_by_hand[i], ")") = 0;
++ c = strstr(func_dealt_by_hand[i], "_");
++ if (c && c != func_dealt_by_hand[i]) *c = 0;
++ i ++;
++ }
++ }
++ fclose(f);
++
++ int j = 0;
++ while(ignore_func[j])
++ {
++ func_dealt_by_hand[i] = ignore_func[j];
++ i++;
++ j++;
++ }
++}
++
++static const char* just_for_server_side_list[] =
++{
++ "glEnableClientState",
++ "glDisableClientState",
++ "glPushClientAttrib",
++ "glPopClientAttrib",
++ "glPixelStorei",
++ "glPixelStoref",
++ "glClientActiveTexture",
++ "glClientActiveTextureARB",
++ "glEnableVertexAttribArray",
++ "glEnableVertexAttribArrayARB",
++ "glDisableVertexAttribArray",
++ "glDisableVertexAttribArrayARB",
++ "glDrawElementArrayATI",
++ "glDrawRangeElementArrayATI",
++ "glGenSymbolsEXT",
++ "glFreeObjectBufferATI",
++ "glUnmapObjectBufferATI",
++ "glLockArraysEXT",
++ "glUnlockArraysEXT",
++ "glDepthFunc",
++ "glFogf",
++ "glFogi",
++ "glClipPlane",
++ "glGetClipPlane",
++
++/* begin of openquartz optimization */
++#if 1
++ "glMatrixMode",
++ "glOrtho",
++ "glFrustum",
++ "glPushMatrix",
++ "glPopMatrix",
++ "glLoadIdentity",
++ "glLoadMatrixd",
++ "glLoadMatrixf",
++ "glMultMatrixd",
++ "glMultMatrixf",
++ "glRotated",
++ "glRotatef",
++ "glScaled",
++ "glScalef",
++ "glTranslated",
++ "glTranslatef",
++#endif
++/* end of openquartz optimization */
++
++ "glGetError",
++ "glActiveTextureARB",
++
++ "glViewport",
++ "glScissor",
++
++ "glBindBufferARB",
++ "glDeleteBuffersARB",
++ "glGenBuffersARB",
++ "glBufferDataARB",
++ "glBufferSubDataARB",
++ "glGetBufferSubDataARB",
++ "glGetBufferParameterivARB",
++ "glBindBuffer",
++ "glDeleteBuffers",
++ "glGenBuffers",
++ "glBufferData",
++ "glBufferSubData",
++ "glGetBufferSubData",
++ "glGetBufferParameteriv",
++
++ "glPushAttrib",
++ "glPopAttrib",
++ "glEnable",
++ "glDisable",
++ "glIsEnabled",
++ "glBindTexture",
++ "glBindTextureEXT",
++ "glFogfv",
++ "glFogiv",
++ "glBitmap",
++ "glGetTexImage",
++ "glReadPixels",
++ "glDrawPixels",
++ "glSelectBuffer",
++ "glFeedbackBuffer",
++
++ "glTexImage1D",
++ "glTexImage2D",
++ "glTexImage3D",
++ "glTexSubImage1D",
++ "glTexSubImage2D",
++ "glTexSubImage3D",
++
++ "glTexImage3DEXT",
++ "glTexSubImage1DEXT",
++ "glTexSubImage2DEXT",
++ "glTexSubImage3DEXT",
++
++ "glGetCompressedTexImage",
++ "glCompressedTexImage1D",
++ "glCompressedTexImage2D",
++ "glCompressedTexImage3D",
++ "glCompressedTexSubImage1D",
++ "glCompressedTexSubImage2D",
++ "glCompressedTexSubImage3D",
++
++ "glGetCompressedTexImageARB",
++ "glCompressedTexImage1DARB",
++ "glCompressedTexImage2DARB",
++ "glCompressedTexImage3DARB",
++ "glCompressedTexSubImage1DARB",
++ "glCompressedTexSubImage2DARB",
++ "glCompressedTexSubImage3DARB",
++
++ "glCallLists",
++ "glNewList",
++ "glDeleteLists",
++ "glGenLists",
++
++ "glGenTextures",
++ "glDeleteTextures",
++ "glDeleteTexturesEXT",
++ "glMap1f",
++ "glMap1d",
++ "glMap2f",
++ "glMap2d",
++ "glGetMapdv",
++ "glGetMapfv",
++ "glGetMapiv",
++ "glGetBooleanv",
++ "glGetIntegerv",
++ "glGetFloatv",
++ "glGetDoublev",
++
++ "glGetPixelMapfv",
++ "glGetPixelMapuiv",
++ "glGetPixelMapusv",
++ "glGetProgramStringARB",
++ "glGetProgramStringNV",
++ "glArrayElement",
++ "glDrawArrays",
++ "glDrawElements",
++ "glDrawRangeElements",
++ "glDrawRangeElementsEXT",
++ "glGetProgramInfoLog",
++ "glGetTexLevelParameteriv",
++ "glGetInfoLogARB",
++ "glGetShaderInfoLog",
++ "glGetAttachedObjectsARB",
++ "glGetAttachedShaders",
++ "glGetActiveUniformARB",
++ "glGetActiveUniform",
++ "glGetUniformLocationARB",
++ "glGetUniformLocation",
++ "glGetUniformfvARB",
++ "glGetUniformfv",
++ "glGetUniformivARB",
++ "glGetUniformiv",
++ "glGetUniformuivEXT",
++ "glGetShaderSourceARB",
++ "glGetShaderSource",
++ "glGetActiveAttribARB",
++ "glGetActiveAttrib",
++ "glGetAttribLocationARB",
++ "glGetAttribLocation",
++
++ "glNewObjectBufferATI",
++ "glUpdateObjectBufferATI",
++
++ "glSetLocalConstantEXT",
++ "glSetInvariantEXT",
++ "glVariantbvEXT",
++ "glVariantsvEXT",
++ "glVariantivEXT",
++ "glVariantfvEXT",
++ "glVariantdvEXT",
++ "glVariantubvEXT",
++ "glVariantusvEXT",
++ "glVariantuivEXT",
++ "glGetVariantBooleanvEXT",
++ "glGetVariantIntegervEXT",
++ "glGetVariantFloatvEXT",
++ "glGetInvariantBooleanvEXT",
++ "glGetInvariantIntegervEXT",
++ "glGetInvariantFloatvEXT",
++ "glGetLocalConstantBooleanvEXT",
++ "glGetLocalConstantIntegervEXT",
++ "glGetLocalConstantFloatvEXT",
++
++ "glMatrixIndexubvARB",
++ "glMatrixIndexusvARB",
++ "glMatrixIndexuivARB",
++
++ "glColorTable",
++ "glColorSubTable",
++ "glGetColorTable",
++ "glConvolutionFilter1D",
++ "glConvolutionFilter2D",
++ "glGetConvolutionFilter",
++ "glSeparableFilter2D",
++ "glGetSeparableFilter",
++ "glGetHistogram",
++ "glGetMinmax",
++ "glColorTableEXT",
++ "glColorSubTableEXT",
++ "glGetColorTableEXT",
++ "glConvolutionFilter1DEXT",
++ "glConvolutionFilter2DEXT",
++ "glGetConvolutionFilterEXT",
++ "glSeparableFilter2DEXT",
++ "glGetSeparableFilterEXT",
++ "glGetHistogramEXT",
++ "glGetMinmaxEXT",
++
++ "glGetTexParameterfv",
++
++ "glGetVertexAttribivARB",
++ "glGetVertexAttribfvARB",
++ "glGetVertexAttribdvARB",
++ "glGetVertexAttribiv",
++ "glGetVertexAttribfv",
++ "glGetVertexAttribdv",
++
++ "glGetDetailTexFuncSGIS",
++ "glGetSharpenTexFuncSGIS",
++
++ "fake_gluBuild2DMipmaps",
++
++ "glRenderMode",
++
++ "glEnableVariantClientStateEXT",
++ "glDisableVariantClientStateEXT",
++
++ "glGetActiveVaryingNV",
++
++ NULL,
++};
++
++static int just_for_server_side_func(char* funcname)
++{
++ int i;
++ for(i=0;just_for_server_side_list[i];i++)
++ {
++ if (strcmp(just_for_server_side_list[i], funcname) == 0)
++ return 1;
++ }
++ return 0;
++}
++
++int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
++{
++ char buffer[256];
++ while(fgets(buffer, 256, f))
++ {
++
++ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
++ {
++ int i = 0;
++ int skip = 0;
++ if (func_dealt_by_hand[0] == 0)
++ {
++ get_func_dealt_by_hand();
++ }
++ while (func_dealt_by_hand[i])
++ {
++ if (strstr(buffer, func_dealt_by_hand[i]))
++ {
++ skip = 1;
++ break;
++ }
++ i++;
++ }
++ if (skip)
++ continue;
++
++ char** args = malloc(15 * sizeof(char*));
++ int narg = 0;
++ char* type = buffer + 6;
++ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
++ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
++ n[-1] = 0;
++ type = strdup(type);
++ n += skip_length;
++ char* fonc = n;
++ n = strstr(n, "(");
++ if (n[-1] == ' ') n[-1] = 0;
++ n[0] = 0;
++ fonc = strdup(fonc);
++ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
++ {
++ }
++ else*/
++
++
++ if (ignoreEXT == 1 && isExtByName(fonc))
++ {
++ free(type);
++ free(fonc);
++ continue;
++ }
++ n++;
++ while(1)
++ {
++ char* virg = strstr(n, ",");
++ if (virg)
++ {
++ args[narg] = n;
++ virg[0] = 0;
++ args[narg] = get_arg_type(args[narg]);
++ narg++;
++ n = virg+1;
++ }
++ else
++ break;
++ }
++ while (strstr(n, ")") == 0)
++ {
++ fgets(buffer, 256, f);
++ n = buffer;
++ while(1)
++ {
++ char* virg = strstr(n, ",");
++ if (virg)
++ {
++ args[narg] = n;
++ virg[0] = 0;
++ args[narg] = get_arg_type(args[narg]);
++ narg++;
++ n = virg+1;
++ }
++ else
++ break;
++ }
++ }
++ char* par = strstr(n, ")");
++ args[narg] = n;
++ par[0] = 0;
++ args[narg] = get_arg_type(args[narg]);
++ narg++;
++
++
++ /*printf("%s %s (", type, fonc);
++ for(i=0;i<narg;i++)
++ {
++ printf("%s,", args[i]);
++ }
++ printf(")\n");*/
++
++ for(i=0;i<funcDescCount;i++)
++ {
++ if (strcmp(funcDesc[i].name, fonc) == 0)
++ {
++ if (ignoreEXT == 0)
++ funcDesc[i].isExt = 1;
++ break;
++ }
++ }
++ if (i == funcDescCount)
++ {
++ funcDesc[funcDescCount].type = type;
++ funcDesc[funcDescCount].name = fonc;
++ funcDesc[funcDescCount].nargs = narg;
++ funcDesc[funcDescCount].args = args;
++ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
++ funcDescCount++;
++ }
++ else
++ {
++ free(fonc);
++ free(args);
++ free(type);
++ }
++ /*
++ for(i=0;i<narg;i++)
++ {
++ free(args[i]);
++ }
++ free(fonc);
++ free(type);*/
++ }
++ }
++ return funcDescCount;
++}
++
++typedef struct
++{
++ char* str;
++ int i;
++} StringIntStruct;
++
++StringIntStruct argDependingOnPreviousArgTab[] =
++{
++ { "glLoadProgramNV", 3},
++ { "ProgramNamedParameter", 2},
++ { "glDeleteBuffers", 1},
++ { "glDrawBuffers", 1},
++ { "glGenPrograms", 1},
++ { "glDeletePrograms", 1},
++ { "glGenQueries", 1},
++ { "glDeleteQueries", 1},
++ { "glGenFencesNV", 1},
++ { "glDeleteFencesNV", 1},
++ { "glGenOcclusionQueriesNV", 1},
++ { "glDeleteOcclusionQueriesNV", 1},
++ { "glRequestResidentProgramsNV", 1},
++ { "glDeleteTextures", 1},
++ { "glGenFramebuffersEXT", 1},
++ { "glDeleteFramebuffersEXT", 1},
++ { "glGenRenderbuffersEXT", 1},
++ { "glDeleteRenderbuffersEXT", 1},
++ { "glUniform1fv", 2},
++ { "glUniform2fv", 2},
++ { "glUniform3fv", 2},
++ { "glUniform4fv", 2},
++ { "glUniform1iv", 2},
++ { "glUniform2iv", 2},
++ { "glUniform3iv", 2},
++ { "glUniform4iv", 2},
++ { "glUniform1uivEXT", 2},
++ { "glUniform2uivEXT", 2},
++ { "glUniform3uivEXT", 2},
++ { "glUniform4uivEXT", 2},
++ { "glProgramParameters4fvNV", 3},
++ { "glProgramParameters4dvNV", 3},
++ { "glProgramLocalParameters4fvEXT", 3},
++ { "glProgramLocalParametersI4ivNV", 3},
++ { "glProgramLocalParametersI4uivNV", 3},
++ { "glProgramEnvParameters4fvEXT", 3},
++ { "glProgramEnvParametersI4ivNV", 3},
++ { "glProgramEnvParametersI4uivNV", 3},
++ { "glAreProgramsResidentNV", 1} ,
++ { "glAreProgramsResidentNV", 2} ,
++ { "glAreTexturesResident", 1} ,
++ { "glAreTexturesResident", 2} ,
++ { "glPrioritizeTextures", 1} ,
++ { "glPrioritizeTextures", 2} ,
++ { "glProgramStringARB", 3} ,
++
++ { "glVertexAttribs", 2},
++
++ { "glUniformMatrix", 3 },
++
++ { "glGetVertexAttribfv", 2},
++ { "glGetVertexAttribiv", 2},
++ { "glGetVertexAttribdv", 2},
++ { "glGetVertexAttribIivEXT", 2},
++ { "glGetVertexAttribIuivEXT", 2},
++
++ { "glPointParameterfv", 1},
++ { "glPointParameteriv", 1},
++
++ { "glWeightbvARB", 1},
++ { "glWeightsvARB", 1},
++ { "glWeightivARB", 1},
++ { "glWeightfvARB", 1},
++ { "glWeightdvARB", 1},
++ { "glWeightubvARB", 1},
++ { "glWeightusvARB", 1},
++ { "glWeightuivARB", 1},
++
++ { "glTexEnvfv", 2},
++ { "glTexEnviv", 2},
++ { "glGetTexEnvfv", 2},
++ { "glGetTexEnviv", 2},
++ { "glTexGendv", 2},
++ { "glTexGenfv", 2},
++ { "glTexGeniv", 2},
++ { "glGetTexGendv", 2},
++ { "glGetTexGenfv", 2},
++ { "glGetTexGeniv", 2},
++
++ { "glLightfv", 2},
++ { "glLightiv", 2},
++ { "glGetLightfv", 2},
++ { "glGetLightiv", 2},
++ { "glFragmentLightfvSGIX", 2},
++ { "glFragmentLightivSGIX", 2},
++ { "glGetFragmentLightfvSGIX", 2},
++ { "glGetFragmentLightivSGIX", 2},
++
++
++ { "glLightModelfv", 1},
++ { "glLightModeliv", 1},
++ { "glFragmentLightModelfvSGIX", 1},
++ { "glFragmentLightModelivSGIX", 1},
++
++ { "glMaterialfv", 2},
++ { "glMaterialiv", 2},
++ { "glGetMaterialfv", 2},
++ { "glGetMaterialiv", 2},
++ { "glFragmentMaterialfvSGIX", 2},
++ { "glFragmentMaterialivSGIX", 2},
++ { "glGetFragmentMaterialfvSGIX", 2},
++ { "glGetFragmentMaterialivSGIX", 2},
++
++ { "glFogiv", 1},
++ { "glFogfv", 1},
++
++ { "glTexParameterfv", 2},
++ { "glTexParameteriv", 2},
++ { "glGetTexParameterfv", 2},
++ { "glGetTexParameteriv", 2},
++
++ { "glTexParameterIivEXT", 2},
++ { "glTexParameterIuivEXT", 2},
++ { "glGetTexParameterIivEXT", 2},
++ { "glGetTexParameterIuivEXT", 2},
++
++ { "glPixelMapfv", 2},
++ { "glPixelMapuiv", 2},
++ { "glPixelMapusv", 2},
++
++ { "glDetailTexFuncSGIS", 2 },
++ { "glSharpenTexFuncSGIS", 2 },
++
++ { "glSpriteParameterfvSGIX", 1 },
++ { "glSpriteParameterivSGIX", 1 },
++
++ { "ConvolutionParameter", 2},
++
++ { "glProgramBufferParametersfvNV", 4},
++ { "glProgramBufferParametersIivNV", 4},
++ { "glProgramBufferParametersIuivNV", 4},
++
++ { "glTransformFeedbackAttribsNV", 1},
++ { "glTransformFeedbackVaryingsNV", 2},
++};
++
++int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
++{
++ int i;
++ if (strstr(funcDesc->args[j], "*") == NULL)
++ return 0;
++ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
++ {
++ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
++ return 1;
++ }
++ return 0;
++}
++
++static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
++{
++ int j;
++ for(j=0;j<funcDesc->nargs;j++)
++ {
++ if (j != 0) fprintf(f,", ");
++ if (strstr(funcDesc->args[j], "[16]"))
++ {
++ if (strstr(funcDesc->args[j], "float"))
++ {
++ fprintf(f, "const GLfloat arg_%d[16]", j);
++ }
++ else if (strstr(funcDesc->args[j], "double"))
++ {
++ fprintf(f, "const GLdouble arg_%d[16]", j);
++ }
++ else
++ {
++ exit(-1);
++ }
++ }
++ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
++ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
++ else
++ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
++ }
++}
++
++int main(int argc, char* argv[])
++{
++ FuncDesc funcDesc[3000];
++ int funcDescCount = 0;
++ FILE* f;
++
++ f = fopen("../target-i386/mesa_gl.h", "r");
++ assert(f);
++ /*if (!f)
++ f = fopen("/usr/include/GL/gl.h", "r");*/
++ funcDescCount = parse(f, funcDesc, 0, 1);
++ fclose(f);
++
++ f = fopen("../target-i386/mesa_glext.h", "r");
++ assert(f);
++ /*if (!f)
++ f = fopen("/usr/include/GL/glext.h", "r");*/
++ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
++ fclose(f);
++
++ FILE* header = fopen("gl_func.h", "w");
++ FILE* client_stub = fopen("client_stub.c", "w");
++ FILE* server_stub = fopen("server_stub.c", "w");
++
++ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
++ fprintf(header, "#define COMPOSE(x,y) x##y\n");
++ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
++ fprintf(header, "enum {\n"
++ "#include \"gl_func_perso.h\"\n");
++
++ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
++
++ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
++
++ int i;
++ for(i=0;i<funcDescCount;i++)
++ {
++ funcDesc[i].ok = 0;
++ char* name = funcDesc[i].name;
++ char* type = funcDesc[i].type;
++ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
++ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
++ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
++ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
++ {
++ int pointer_of_unknown_size = 0;
++ int j;
++
++ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
++ {
++ funcDesc[i].nargs = 0;
++ }
++ for(j=0;j<funcDesc[i].nargs-1;j++)
++ {
++ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
++ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
++ strstr(funcDesc[i].args[j], "[16]") == NULL)
++ {
++ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
++ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
++ }
++ }
++
++ if (pointer_of_unknown_size == 0)
++ {
++ char* signature_type_name;
++ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
++ {
++ if (strstr(signature_type_name, "TYPE_OUT"))
++ funcDesc[i].has_out_parameters = 1;
++ }
++ else
++ {
++ if (funcDesc[i].nargs-1 >= 0)
++ {
++ j = funcDesc[i].nargs-1;
++ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
++ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
++ strstr(funcDesc[i].args[j], "[16]") == NULL)
++ {
++ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
++ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
++ }
++ }
++ }
++ }
++ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
++ {
++ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
++ {
++ free(funcDesc[i].args[0]);
++ if (strstr(funcDesc[i].name, "Matrixf"))
++ funcDesc[i].args[0] = strdup("GLfloat m[16]");
++ else
++ funcDesc[i].args[0] = strdup("GLdouble m[16]");
++ pointer_of_unknown_size = 0;
++ }
++ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
++ {
++ free(funcDesc[i].args[0]);
++ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
++ pointer_of_unknown_size = 0;
++ }
++ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
++ {
++ free(funcDesc[i].args[0]);
++ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
++ funcDesc[i].has_out_parameters = 1;
++ pointer_of_unknown_size = 0;
++ }
++ }
++ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
++ {
++ fprintf(header, " %s_func,\n", funcDesc[i].name);
++ funcDesc[i].ok = 1;
++ if (just_for_server_side_func(name))
++ funcDesc[i].just_for_server_side = 1;
++ for(j=0;j<funcDesc[i].nargs;j++)
++ {
++ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
++ funcDesc[i].has_out_parameters = 1;
++ }
++ }
++ else
++ {
++ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
++ }
++ }
++ }
++
++ fprintf(header, " GL_N_CALLS\n};\n");
++
++
++ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
++ fprintf(server_stub, "{\n");
++ fprintf(server_stub, " switch(func_number)\n");
++ fprintf(server_stub, " {\n");
++
++
++ for(i=0;i<funcDescCount;i++)
++ {
++ if (funcDesc[i].ok)
++ {
++ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
++ funcDesc[i].name,
++ get_type_string(funcDesc[i].type),
++ funcDesc[i].has_out_parameters);
++ fprintf(header, "%d", funcDesc[i].nargs);
++ int j;
++ char* signature_type_name;
++ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
++
++ for(j=0;j<n_args_to_check;j++)
++ {
++ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
++ {
++ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
++ }
++ else
++ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
++ }
++
++ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
++ {
++ fprintf(header, ", %s", signature_type_name);
++ }
++ fprintf(header, "};\n");
++
++
++ if (funcDesc[i].just_for_server_side == 0)
++ {
++ if (isExt(&funcDesc[i]))
++ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
++ else
++ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
++ fprintf_prototype_args(client_stub, &funcDesc[i]);
++ fprintf(client_stub, ")\n");
++ fprintf(client_stub, "{\n");
++ if (strcmp(funcDesc[i].type, "void") != 0)
++ {
++ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
++ if (isExt(&funcDesc[i]))
++ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
++ }
++ else
++ {
++ if (isExt(&funcDesc[i]))
++ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
++ }
++
++ /*
++ fprintf(client_stub, " do_opengl_call(%s_func, %s",
++ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
++ for(j=0;j<funcDesc[i].nargs;j++)
++ {
++ fprintf(client_stub, ", arg_%d", j);
++ }
++ fprintf(client_stub, ");\n");
++ */
++
++ if (funcDesc[i].nargs)
++ {
++ fprintf(client_stub, " long args[] = { ");
++ for(j=0;j<funcDesc[i].nargs;j++)
++ {
++ if (j > 0) fprintf(client_stub, ", ");
++ if (strstr(funcDesc[i].args[j], "*"))
++ {
++ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
++ }
++ else
++ {
++ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
++ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
++ fprintf(client_stub, "CHAR_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
++ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
++ fprintf(client_stub, "SHORT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
++ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
++ fprintf(client_stub, "INT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
++ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
++ fprintf(client_stub, "FLOAT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
++ fprintf(client_stub, "POINTER_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
++ fprintf(client_stub, "DOUBLE_TO_ARG");
++ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
++ fprintf(client_stub, "POINTER_TO_ARG");
++ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
++ fprintf(client_stub, "POINTER_TO_ARG");
++ else
++ {
++ fprintf(stderr, "Unknown : %s\n", symbolic_type);
++ assert(0);
++ }
++ fprintf(client_stub, "(arg_%d)", j);
++ }
++ }
++ fprintf(client_stub, "};\n");
++ }
++
++ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
++ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
++ (funcDesc[i].nargs) ? "args" : "NULL");
++
++ if (strcmp(funcDesc[i].type, "void") != 0)
++ {
++ fprintf(client_stub, " return ret;\n");
++ }
++ fprintf(client_stub, "}\n\n");
++ }
++
++ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
++ fprintf(server_stub, " {\n");
++
++ if (isExt(&funcDesc[i]))
++ {
++ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
++ fprintf_prototype_args(server_stub, &funcDesc[i]);
++ fprintf(server_stub, "));\n");
++ }
++
++ fprintf(server_stub, " ");
++
++ if (strcmp(funcDesc[i].type, "void") == 0)
++ ;
++ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
++ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
++ fprintf(server_stub, "*pret_int = ");
++ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
++ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
++ fprintf(server_stub, "*pret_char = ");
++ else
++ {
++ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
++ exit(-1);
++ }
++ /*if (strstr(funcDesc[i].name, "EXT"))
++ {
++ char* dup = strdup(funcDesc[i].name);
++ *strstr(dup, "EXT") = 0;
++ fprintf(server_stub, "%s(", dup);
++ free(dup);
++ }
++ else*/
++ {
++ if (isExt(&funcDesc[i]))
++ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
++ else
++ fprintf(server_stub, "%s(", funcDesc[i].name);
++ }
++ char* c_type_name;
++ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
++ {
++ for(j=0;j<funcDesc[i].nargs - 1;j++)
++ {
++ if (j != 0) fprintf(server_stub,", ");
++ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
++ }
++ if (j != 0) fprintf(server_stub,", ");
++ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
++ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
++ else
++ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
++ }
++ else
++ {
++ for(j=0;j<funcDesc[i].nargs;j++)
++ {
++ if (j != 0) fprintf(server_stub,", ");
++ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
++ }
++ }
++ fprintf(server_stub, ");\n");
++
++ fprintf(server_stub, " break;\n");
++ fprintf(server_stub, " }\n");
++ }
++ }
++
++ fprintf(server_stub, " default:\n");
++ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
++ fprintf(server_stub, " break;\n");
++ fprintf(server_stub, " }\n");
++ fprintf(server_stub, "}\n");
++
++ fprintf(header, "#undef MAGIC_MACRO\n");
++ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
++ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
++ fprintf(header, "{\n");
++ fprintf(header, "#include \"gl_func_perso.h\"\n");
++ for(i=0;i<funcDescCount;i++)
++ {
++ if (funcDesc[i].ok)
++ {
++ fprintf(header, " %s_signature,\n", funcDesc[i].name);
++ }
++ }
++ fprintf(header, "};\n\n");
++
++ fprintf(header, "#undef MAGIC_MACRO\n");
++ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
++ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
++ fprintf(header, "{\n");
++ fprintf(header, "#include \"gl_func_perso.h\"\n");
++ for(i=0;i<funcDescCount;i++)
++ {
++ if (funcDesc[i].ok)
++ {
++ fprintf(header, " \"%s\",\n", funcDesc[i].name);
++ }
++ }
++ fprintf(header, "};\n\n");
++
++ fclose(header);
++ fclose(server_stub);
++ fclose(client_stub);
++
++ return 0;
++}
+Index: trunk/target-i386/parse_mesa_get_c.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/target-i386/parse_mesa_get_c.c 2009-01-19 23:06:08.000000000 +0000
+@@ -0,0 +1,225 @@
++/*
++ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
++ *
++ * Copyright (c) 2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include <assert.h>
++
++#include "mesa_gl.h"
++#include "mesa_glext.h"
++
++/* #include "mesa_enums.c" */
++
++int gl_lookup_enum_by_name(const char* name)
++{
++ FILE* f;
++ char buffer[256];
++ char template1[256];
++ char template2[256];
++ int i;
++ sprintf(template1, "#define %s\t", name);
++ sprintf(template2, "#define %s ", name);
++ for(i=0;i<2;i++)
++ {
++ if (i == 0)
++ f = fopen("mesa_gl.h", "r");
++ else
++ f = fopen("mesa_glext.h", "r");
++ while(fgets(buffer, 256, f))
++ {
++ if (strstr(buffer, template1) || strstr(buffer, template2))
++ {
++ char* c = strstr(buffer, "0x");
++ assert(c);
++ int ret;
++ ret = strtol(c, NULL, 16);
++ return ret;
++ }
++ }
++ fclose(f);
++ }
++
++ return -1;
++}
++
++typedef struct
++{
++ int value;
++ char* name;
++ int nb_elts;
++} Token;
++
++int compare_func(Token* a, Token* b)
++{
++ return a->value - b->value;
++}
++
++typedef struct
++{
++ int i;
++ char* str;
++} Cpl;
++#define CPL(x) {x, #x}
++
++Cpl constantsOneVal[] =
++{
++ CPL(GL_MAX_GENERAL_COMBINERS_NV),
++ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
++ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
++ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
++ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
++ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
++};
++#define NB_CONSTANTS_ONE_VAL 11
++
++int main(int argc, char* argv[])
++{
++ FILE* f = fopen("mesa_get.c", "r");
++ char buffer[256];
++ int state = 0;
++ char name[256];
++ int count = 0;
++ char template[256];
++ Token tokens[1000];
++ int ntoken = 0;
++ int i;
++ FILE* outf = fopen("glgetv_cst.h", "w");
++
++ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
++ fprintf(outf, "typedef struct {\n");
++ fprintf(outf, " GLuint count;\n");
++ fprintf(outf, " GLenum token;\n");
++ fprintf(outf, " const char *name;\n");
++ fprintf(outf, "} GlGetConstant ;\n");
++ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
++
++ while(fgets(buffer, 256, f))
++ {
++ if (strstr(buffer, "_mesa_GetBooleanv"))
++ {
++ state = 1;
++ }
++ else if (state == 1)
++ {
++ if (strstr(buffer, "_mesa_GetFloatv"))
++ {
++ break;
++ }
++ else if (strstr(buffer, "case GL_"))
++ {
++ strcpy(name, strstr(buffer, "case GL_") + 5);
++ *strstr(name, ":") = 0;
++ count = 0;
++ strcpy(template, "params[0]");
++ }
++ else if (strstr(buffer, template))
++ {
++ count ++;
++ sprintf(template, "params[%d]", count);
++ }
++ else if (strstr(buffer, "break"))
++ {
++ if (count > 0)
++ {
++ int gl_lookup = gl_lookup_enum_by_name(name);
++ /*
++ int mesa_lookup = _mesa_lookup_enum_by_name(name);
++ if (mesa_lookup != -1)
++ {
++ if(mesa_lookup != gl_lookup)
++ {
++ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
++ exit(-1);
++ }
++ }*/
++ if (gl_lookup == -1)
++ {
++ fprintf(stderr, "not found in includes : %s\n", name);
++ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
++ }
++ else
++ {
++ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
++ tokens[ntoken].value = gl_lookup;
++ tokens[ntoken].nb_elts = count;
++ tokens[ntoken].name = strdup(name);
++ ntoken++;
++ }
++ /*fprintf(outf, "#ifdef %s\n", name);
++ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
++ fprintf(outf, "#endif\n");*/
++ }
++ else
++ fprintf(stderr, "not recognized : %s\n", name);
++ }
++ }
++ }
++
++ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
++ {
++ tokens[ntoken].value = constantsOneVal[i].i;
++ tokens[ntoken].nb_elts = 1;
++ tokens[ntoken].name = strdup(constantsOneVal[i].str);
++ ntoken++;
++ }
++
++ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
++ tokens[ntoken].nb_elts = 1;
++ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
++ ntoken++;
++
++ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
++ tokens[ntoken].nb_elts = 3;
++ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
++ ntoken++;
++
++ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
++ tokens[ntoken].nb_elts = 3;
++ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
++ ntoken++;
++
++ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
++ tokens[ntoken].nb_elts = 4;
++ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
++ ntoken++;
++
++
++ qsort(tokens, ntoken, sizeof(Token), compare_func);
++ for(i=0;i<ntoken;i++)
++ {
++ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
++ }
++ fprintf(outf, "};\n");
++ fclose(f);
++ fclose(outf);
++ return 0;
++}
+Index: trunk/target-i386/translate.c
+===================================================================
+--- trunk.orig/target-i386/translate.c 2009-01-05 11:10:06.000000000 +0000
++++ trunk/target-i386/translate.c 2009-01-19 23:06:08.000000000 +0000
+@@ -2592,11 +2592,18 @@
+ s->is_jmp = 3;
+ }
+
++int enable_gl = 0;
++
+ /* an interrupt is different from an exception because of the
+ privilege checks */
+ static void gen_interrupt(DisasContext *s, int intno,
+ target_ulong cur_eip, target_ulong next_eip)
+ {
++ if (enable_gl && intno == 0x99) {
++ gen_helper_opengl();
++ return;
++ }
++
+ if (s->cc_op != CC_OP_DYNAMIC)
+ gen_op_set_cc_op(s->cc_op);
+ gen_jmp_im(cur_eip);
+Index: trunk/vl.c
+===================================================================
+--- trunk.orig/vl.c 2009-01-05 11:10:23.000000000 +0000
++++ trunk/vl.c 2009-01-19 23:06:08.000000000 +0000
+@@ -240,6 +240,7 @@
+ const char *file;
+ char opt[1024];
+ } drives_opt[MAX_DRIVES];
++extern int enable_gl;
+
+ static CPUState *cur_cpu;
+ static CPUState *next_cpu;
+@@ -4074,6 +4075,7 @@
+ QEMU_OPTION_old_param,
+ QEMU_OPTION_clock,
+ QEMU_OPTION_startdate,
++ QEMU_OPTION_enable_gl,
+ QEMU_OPTION_tb_size,
+ QEMU_OPTION_icount,
+ QEMU_OPTION_uuid,
+@@ -4193,6 +4195,7 @@
+ #endif
+ { "clock", HAS_ARG, QEMU_OPTION_clock },
+ { "startdate", HAS_ARG, QEMU_OPTION_startdate },
++ { "enable-gl", 0, QEMU_OPTION_enable_gl },
+ { "tb-size", HAS_ARG, QEMU_OPTION_tb_size },
+ { "icount", HAS_ARG, QEMU_OPTION_icount },
+ { "incoming", HAS_ARG, QEMU_OPTION_incoming },
+@@ -5105,6 +5108,11 @@
+ }
+ }
+ break;
++#ifdef TARGET_OPENGL_OK
++ case QEMU_OPTION_enable_gl:
++ enable_gl = 1;
++ break;
++#endif
+ case QEMU_OPTION_tb_size:
+ tb_size = strtol(optarg, NULL, 0);
+ if (tb_size < 0)
diff --git a/meta/packages/qemu/qemu_svn.bb b/meta/packages/qemu/qemu_svn.bb
index e6b23cbe1..b5113bde1 100644
--- a/meta/packages/qemu/qemu_svn.bb
+++ b/meta/packages/qemu/qemu_svn.bb
@@ -1,7 +1,7 @@
LICENSE = "GPL"
DEPENDS = "zlib"
PV = "0.9.1+svnr${SRCREV}"
-PR = "r14"
+PR = "r15"
FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-0.9.1+svn/"
@@ -18,17 +18,19 @@ SRC_URI = "\
file://91-oh-sdl-cursor.patch;patch=1;pnum=0 \
file://qemu-amd64-32b-mapping-0.9.0.patch;patch=1 \
file://workaround_bad_futex_headers.patch;patch=1 \
+ file://qemu-add-gl-host-code.patch;patch=1 \
file://no-strip.patch;patch=1 \
file://fix-dirent.patch;patch=1"
S = "${WORKDIR}/trunk"
#EXTRA_OECONF += "--disable-sdl"
-#EXTRA_OECONF += "--target-list=arm-linux-user,arm-softmmu,i386-softmmu"
+EXTRA_OECONF += "--target-list=arm-linux-user,arm-softmmu,i386-softmmu"
EXTRA_OECONF += "--disable-gfx-check"
inherit autotools
do_configure() {
${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
+ chmod a+x ${S}/target-i386/beginend_funcs.sh
}